Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Questions about profiling a WebSphere web application
Questions about profiling a WebSphere web application [message #141310] Mon, 23 March 2009 17:05 Go to next message
Nuo is currently offline NuoFriend
Messages: 2
Registered: July 2009
Junior Member
Hi all,

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
PlantsByWebSphere.
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:
TRACE."
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"
time="1237823137.073683023"/>

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
file?
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 #141321 is a reply to message #141310] Mon, 23 March 2009 18:43 Go to previous messageGo to next message
Nuo is currently offline NuoFriend
Messages: 2
Registered: July 2009
Junior Member
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!
Re: Questions about profiling a WebSphere web application [message #141488 is a reply to message #141321] Mon, 30 March 2009 15:44 Go to previous message
Eugene Chan is currently offline Eugene ChanFriend
Messages: 287
Registered: July 2009
Senior Member
Hi Nuo.

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.
http://www.eclipse.org/tptp/platform/documents/resources/pro filingspec/XML4Profiling.htm

Eugene



"Nuo " <nuolee@gmail.com> wrote in message
news:14cd4ed1b13f43b2f2fa57a553915d2e$1@www.eclipse.org...
> 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!
>
Previous Topic:Unable to attach an agent locally using eclipse 3.4.2
Next Topic:Directory Monitor using TPTP
Goto Forum:
  


Current Time: Thu Mar 28 14:43:17 GMT 2024

Powered by FUDForum. Page generated in 0.02443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top