Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » How to do a "controlled profiling" of a application on a server
How to do a "controlled profiling" of a application on a server [message #69700] Mon, 08 May 2006 12:27 Go to next message
Ole Laurisch is currently offline Ole LaurischFriend
Messages: 34
Registered: July 2009
Member
Hello,

I am trying to profile an application that is running on my application
server (internal WSAD application server).

When using the option
" -XrunpiAgent:server=standalone,AppServer.trcxml,filters=filt ers.txt,mode=full "
the profiling works, but it is collection data from the start of the
server until I stop the server.
I would prefer saying the profiler when to start and stop profiling,
because I need the exact number of some method calls for example.

Does anybody know, whether (and how) it is possible to configure the
profiling that way?

Thanks in advance,
Ole

PS: When I try to do it the way it is described in the help of the WSAD I
am able to start and stop profiling, but only the EJB calls are profiled -
nothing behind them. Therefor this is useless for me.
Re: How to do a "controlled profiling" of a application on a server [message #69917 is a reply to message #69700] Mon, 08 May 2006 21:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nmehrega.ca.ibm.com

This is a multipart message in MIME format.
--=_alternative 00786EE885257168_=
Content-Type: text/plain; charset="US-ASCII"

Hi Ole,

There are a couple of different things you can do (listed in the order of
how I would recommend them):

1) Easiest thing is to use the -XrunpiAgent:server=enabled option instead.
This will spin off a profiling agent, but it won't halt the start of your
server. If you want to halt the start of your server before attaching to
the profiling agent, use the -XrunpiAgent:server=controlled option. Once
you start the server in enabled mode, you can attach to the profiling
agent in the workbench at anytime you like. Click on the profile button
-> 'Profile...' -> Create a new attach launch configuration -> select your
host -> click on the agents tab and select your agent. You can use this
launch configuration to set your profiling filters.. Once you're done
click on profile. You can pause and resume the profiling agent at anytime
you like to collect data during specific times. Another way would be to
detach and reattach to the agent. Right click on your agent to see how
you can do all this.

2) You can programmatically tell the profiler when to start/stop
profiling. On the TPTP web site (www.eclipse.org/tptp) -> click on
Documents -> click on the appropriate version for the Getting Started with
Agent Controller doc -> select your platform -> under the Invocation of
the Java Profiler from the Command Line. Look at the
applicationControlled option. The biggest problem with this option is
that it won't allow you to specify a filterset. I've opened a defect to
address this.

Navid
--=_alternative 00786EE885257168_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Ole,</font>
<br>
<br><font size=2 face="sans-serif">There are a couple of different things
you can do (listed in the order of how I would recommend them):</font>
<br>
<br><font size=2 face="sans-serif">1) Easiest thing is to use the </font><tt><font size=2>-XrunpiAgent:server=enabled</font></tt><font size=2 face="sans-serif">
option instead. &nbsp;This will spin off a profiling agent, but it won't
halt the start of your server. &nbsp;If you want to halt the start of your
server before attaching to the profiling agent, use the &nbsp;</font><tt><font size=2>-XrunpiAgent:server=controlled</font></tt><font size=2 face="sans-serif">
option. &nbsp;Once you start the server in enabled mode, you can attach
to the profiling agent in the workbench at anytime you like. &nbsp;Click
on the profile button -&gt; 'Profile...' -&gt; Create a new attach launch
configuration -&gt; select your host -&gt; click on the agents tab and
select your agent. &nbsp;You can use this launch configuration to set your
profiling filters.. &nbsp;Once you're done click on profile. &nbsp;You
can pause and resume the profiling agent at anytime you like to collect
data during specific times. &nbsp;Another way would be to detach and reattach
to the agent. &nbsp;Right click on your agent to see how you can do all
this.</font>
<br>
<br><font size=2 face="sans-serif">2) You can programmatically tell the
profiler when to start/stop profiling. &nbsp;On the TPTP web site (www.eclipse.org/tptp)
-&gt; click on Documents -&gt; click on the appropriate version for the
Getting Started with Agent Controller doc -&gt; select your platform -&gt;
under the Invocation of the Java Profiler from the Command Line. &nbsp;Look
at the applicationControlled option. &nbsp;The biggest problem with this
option is that it won't allow you to specify a filterset. &nbsp;I've opened
a defect to address this.</font>
<br>
<br><font size=2 face="sans-serif">Navid</font>
--=_alternative 00786EE885257168_=--
Re: How to do a "controlled profiling" of a application on a server [message #70000 is a reply to message #69917] Tue, 09 May 2006 07:57 Go to previous messageGo to next message
Ole Laurisch is currently offline Ole LaurischFriend
Messages: 34
Registered: July 2009
Member
Hi Navid,

at first I would like to thank you for your quick response.

I tried to use the "enabled" option and had the possibillity to start and
stop the profiling. So far so good.
Unfortunetly the output is not like I expected. Although I defined a
filter like

myapp* * INCLUDE
* * EXCLUDE

I get no output for the packages myapp*.
Otherwise I get multiple output from our oracle.toplink* classes, if I
change the filter to include the packages oracle* for example. So it seems
that the profiling generally works, but not for my classes.

Maybe I am doing something wrong while attaching to the agent. Therefore I
describe the steps I have done. Because I have the german version of the
wsad, I try to translate the buttons and describtion as good as possible.

1. I started the server with the enabled option.
2. I used the arrow of the button with the little man and the watch on it
and choose "Attach" (not "Start") -> "Java Process" (not "Remote Process").
3. In the new window appear two agents: "Java Profiling Agent" and "J2EE
Request Profiler", which I choose both to play safe.
4. After "Next" I choose my default profiling project as the target
project and after another "Next" I defined the filter as aforementioned.
5. At last I ticked the options ("My application needs to much memory" and
"My application is to slow") and then finished the dialog.
6. In the profiling perspective I had two process then for which I started
the monitoring. Then I started my application and after a while loaded the
collected data into the package statistic where I could see nearly nothing
- except for some antlr and java.lang entries - for the profiling agent.
For the J2EE Request Profiler I only saw ejbs.

Maybe I am doing something wrong. I would be very happy, if you can give
me some more detailed instructions.

Many thanks in advance,
Ole
Re: How to do a "controlled profiling" of a application on a server [message #70223 is a reply to message #70000] Tue, 09 May 2006 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nmehrega.ca.ibm.com

This is a multipart message in MIME format.
--=_alternative 00542C1D85257169_=
Content-Type: text/plain; charset="US-ASCII"

Hi Ole,

It seems like you're following the right steps (You don't really need to
attach to the J2EE Request Profiler). There could be several different
reasons why you're classes are not showing up:

1) At the point when you're monitoring your agent, your classes might not
be called. Make sure you're classes are called when you're doing your
monitoring.

2) Your filters could be incorrect. Make sure you're specifying your
package name properly. As an experiment try to include a specific class
(e.g. mypackag.MyClass * INCLUDE) to see if it's included or not. If
your package is something like com.ibm.mypackage, you can try to include
com.ibm* to see if your classes show up. Play around with this to try and
figure it out.

3) This could be an actual bug in TPTP. From the steps you gave, it seems
like you're using a really old version of TPTP. I would recommend
downlaoding TPTP 4.1 to see whether you still have this problem. You can
download TPTP from here:
http://www.eclipse.org/tptp/home/downloads/downloads.php Scroll down to
the Requirements section and download Eclipse SDK 3.1.2 and EMF and XSD.
Scroll up and download TPTP Runtime (All projects) and the Agent
Controller for your platform (don't download New technology Agent
Controller, since this agent controller wasn't thoroughly tested in TPTP
4.1). Now you probably have the IBM RAC installed, which places some DLLs
in your windows/system32 directory. You'll need to uninstall this RAC
(I'll leave it up to you to decide whether you want to do this or not).
Unfortunately the IBM RAC and TPTP RAC cannot coexist. Once you unzip the
Agent Controller, include its bin directory under your PATH. Now give
this a try again. BTW, TPTP doesn't include the J2EE request profiler.

Navid Mehregnai
--=_alternative 00542C1D85257169_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Ole,</font>
<br>
<br><font size=2 face="sans-serif">It seems like you're following the right
steps (You don't really need to attach to the J2EE Request Profiler). &nbsp;There
could be several different reasons why you're classes are not showing up:</font>
<br>
<br><font size=2 face="sans-serif">1) At the point when you're monitoring
your agent, your classes might not be called. &nbsp;Make sure you're classes
are called when you're doing your monitoring.</font>
<br>
<br><font size=2 face="sans-serif">2) Your filters could be incorrect.
&nbsp;Make sure you're specifying your package name properly. &nbsp;As
an experiment try to include a specific class (e.g. mypackag.MyClass &nbsp;
&nbsp;* &nbsp; &nbsp;INCLUDE) to see if it's included or not. &nbsp;If
your package is something like com.ibm.mypackage, you can try to include
com.ibm* to see if your classes show up. &nbsp;Play around with this to
try and figure it out.</font>
<br>
<br><font size=2 face="sans-serif">3) This could be an actual bug in TPTP.
&nbsp;From the steps you gave, it seems like you're using a really old
version of TPTP. &nbsp;I would recommend downlaoding TPTP 4.1 to see whether
you still have this problem. &nbsp;You can download TPTP from here: http://www.eclipse.org/tptp/home/downloads/downloads.php
&nbsp;Scroll down to the Requirements section and download Eclipse SDK
3.1.2 and EMF and XSD. &nbsp;Scroll up and download TPTP Runtime (All projects)
and the Agent Controller for your platform (don't download New technology
Agent Controller, since this agent controller wasn't thoroughly tested
in TPTP 4.1). &nbsp;Now you probably have the IBM RAC installed, which
places some DLLs in your windows/system32 directory. &nbsp;You'll need
to uninstall this RAC (I'll leave it up to you to decide whether you want
to do this or not). &nbsp;Unfortunately the IBM RAC and TPTP RAC cannot
coexist. &nbsp;Once you unzip the Agent Controller, include its bin directory
under your PATH. &nbsp;Now give this a try again. &nbsp;BTW, TPTP doesn't
include the J2EE request profiler.<br>
<br>
Navid Mehregnai</font>
--=_alternative 00542C1D85257169_=--
Re: How to do a "controlled profiling" of a application on a server [message #70480 is a reply to message #70223] Thu, 11 May 2006 10:54 Go to previous messageGo to next message
Ole Laurisch is currently offline Ole LaurischFriend
Messages: 34
Registered: July 2009
Member
Hi Navid,

I tried the profiling with Eclipse 3.1.2 and the "new" TPTP version and
everything works fine!

I would like to thank you very much again for your help!

Ole
Re: How to do a "controlled profiling" of a application on a server [message #70539 is a reply to message #70480] Thu, 11 May 2006 13:56 Go to previous message
Eclipse UserFriend
Originally posted by: nmehrega.ca.ibm.com

This is a multipart message in MIME format.
--=_alternative 004C93C88525716B_=
Content-Type: text/plain; charset="US-ASCII"

No problem. I'm glad I could help.

Navid Mehregani
--=_alternative 004C93C88525716B_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">No problem. I'm glad I could help.</font>
<br>
<br><font size=2 face="sans-serif">Navid Mehregani</font>
--=_alternative 004C93C88525716B_=--
Previous Topic:TPTP project structure
Next Topic:HTTP Response Content from HTTP Recorder
Goto Forum:
  


Current Time: Sat Apr 27 03:24:35 GMT 2024

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

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

Back to the top