|Questions about profiling a WebSphere web application [message #141310]
||Mon, 23 March 2009 17:05
Registered: July 2009
I'm a beginner TPTP and program profiling. My task is to profile a
WebSphere web application with TPTP, get the tracing data and analyze the
tracing data (Without fully instrument the web application).
I've two questions:
1. Why I cannot get method invocation trace in trcxml file (or they're
there but I don't know which tags stand for this information)?
2. Why the web application crashes when I terminate profiling?
Let me describe my environment first:
My web application is a sample web application, named PlantsByWebSphere,
provided by WebSphere Application Server v6.1.
My WebSphere runs on a Linux operation system (Redhat).
I modified the server.xml file for PlantsByWebSphere: append
-XrunpiAgent:server=enabled to the genericJvmArguments attribute value.
Then, I start the PlantsByWebSphere.
I start TPTP on the machine where PlantsByWebSphere is running.
In TPTP, I open the profile configuration wizard, and create a new
configuration under the type of "Attach to Agent".
In the Agents tab, I choose the running agent, "Java Profiling - pre JRE
1.5 (Double click ...)". I choose Basic Momory Analysis, Execution Time
Analysis. I set filter for the profiling as
com.ibm.websphere.samples.plantsbywebsphereejb.* * INCLUDE
* * EXCLUDE
In the Destination tab, I choose "Sending profiling data to a file" and
set the directory of the trcxml file.
After starting profiling, I access different pages of the
When I stop profiling, the trcxml file is generated.
However, the trcxml file (actually it's the inside xml file of the trcxml
file) is not complete, it says "The following tags were not closed:
When I open the incomplete xml file, there are two ClassDef tags (and a
bunch of other tags like threadStart and objAlloc):
<classDef threadIdRef="84" name="java/lang/Class" sourceName="Class.java"
classId="128" objIdRef="129" time="1237823137.074052095"/>
<classDef threadIdRef="84" name="com/ibm/ws/util/ThreadPool$Worker"
sourceName="ThreadPool.java" classId="19" objIdRef="130"
In addition, the web application crashes.
My first question is how shall I get the trace of the method (within my
web application, PlantsByWebSphere) invocation information from a trcxml
I tried to add Probes (using Probekit) by following:
http://www.eclipse.org/tptp/platform/documents/probekit/prob ekit.html, but
I cannot print out anything on console.
My second question is why the web application always crash when I stop
profiling. Is this the reason for the incomplete xml file?
Thanks a lot!!!
|Re: Questions about profiling a WebSphere web application [message #141488 is a reply to message #141321]
||Mon, 30 March 2009 15:44
| Eugene Chan
Registered: July 2009
When you stop a profiling session, it actually stop the server process and
as a result and server is actually stopped and not crashed.
It may take a few second for all the trace event to be flushed to the file,
hence wait a few second before the trace file is completed and closed. The
</TRACE> tag is missed in some case.
Please refer to the following documentation on detail about the events sent
by the profiling agent.
"Nuo " <firstname.lastname@example.org> wrote in message
> Hi all,
> When I sent the last email, I almost give up my task ... But when I try
> again with a new created profiling configuration, I get the method
> invocation (in my web application) information. Although the xml file in
> the trcxml is still incomplete, there exist ClassDef or MethodDef tags for
> my web application classes or methods.
> However, the web application still crashes whenever I stop profiling
> (actually I tried to profile the web application from either client side
> or server side. No matter which side, when I stop profiling, the web
> application crashes. )
> Can anyone give me some suggestion? I guess the crash is a reason for the
> incomplete trace data.
> Thanks a lot!
Powered by FUDForum
. Page generated in 0.01757 seconds