Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Profiler must be started before profiled application

Moderators: Vladimir Kondratyev, Anton Katilin

Profiler must be started before profiled application

Postby Morten Buhr » Tue Sep 14, 2004 2:53 pm

If I do not start the profiler before the application I wish to profile, the resulting profile data is not reliable. I often see CPU usages of seveal hundred thousands of seconds even if I have only profiled for 10 seconds using method tracing.

It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.

Best Regards
/Morten
Morten Buhr
 
Posts: 8
Joined: Tue Sep 14, 2004 2:47 pm

additional info

Postby Morten Buhr » Tue Sep 14, 2004 2:58 pm

I forgot to state that I am connecting remotely to the application to profile - however on the same computer, under WindowsXP and JDK-SE 1.4.2_03

/Morten
Morten Buhr
 
Posts: 8
Joined: Tue Sep 14, 2004 2:47 pm

Re: Profiler must be started before profiled application

Postby Vladimir Kondratyev » Tue Sep 14, 2004 6:02 pm

Morten Buhr wrote:If I do not start the profiler before the application I wish to profile, the resulting profile data is not reliable.


yjpagent has additional parameters to enable profiling just from JVM start.
Please take a look at -Xrunyjpageht:help to lear more about profiler options.

Morten Buhr wrote: I often see CPU usages of seveal hundred thousands of seconds even if I have only profiled for 10 seconds using method tracing.


All profiling results are in milliseconds

Morten Buhr wrote:It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.


Profilier's overhead depends on the method you are using to profile your application. Sampling has almost no impact on performace but it's less accurate.
Vladimir Kondratyev
 
Posts: 1451
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: Profiler must be started before profiled application

Postby Morten Buhr » Wed Sep 15, 2004 6:49 am

Morten Buhr wrote:If I do not start the profiler before the application I wish to profile, the resulting profile data is not reliable.


Vladimir Kondratyev wrote:yjpagent has additional parameters to enable profiling just from JVM start.
Please take a look at -Xrunyjpageht:help to lear more about profiler options.


I know, but I do not want to start profiling until my application is fully up and running

Morten Buhr wrote: I often see CPU usages of seveal hundred thousands of seconds even if I have only profiled for 10 seconds using method tracing.


Vladimir Kondratyev wrote:All profiling results are in milliseconds


My mistake - I meant several hundred thousands of milliseconds.

Morten Buhr wrote:It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.


Vladimir Kondratyev wrote:Profilier's overhead depends on the method you are using to profile your application. Sampling has almost no impact on performace but it's less accurate.


I am aware of that difference. What I was trying to point out was that the CPU profiling results seems incorrect when I start yjp (run yjp.sh) after I have started my application, but delivers correct result when yjp is started before my application. In both cases I do not connect to the application until it is up and running. Also the CPU usage is often substatially higher when yjp is started after my application, using method tracing in both cases.
Morten Buhr
 
Posts: 8
Joined: Tue Sep 14, 2004 2:47 pm

Re: Profiler must be started before profiled application

Postby Vladimir Kondratyev » Wed Sep 15, 2004 9:36 am

Morten Buhr wrote:I know, but I do not want to start profiling until my application is fully up and running


You can try to use profiler API to precisely specify the moment when you want to start profiling. Please take a look at bundled samples (they contain examples of API usage).

Morten Buhr wrote: I often see CPU usages of seveal hundred thousands of seconds even if I have only profiled for 10 seconds using method tracing.


Please send us snapshot with such huge CPU usage. We'll try to investigate the problem.

Morten Buhr wrote:It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.


It's known problem that CPU degradation might happen after tracing. There is a bug in JVMPI. Actually we have reported in to the Sun JVMPI team and they said that this bug will not be fixed. We are going to migrate to new JVMTI API which is introduced in J2SDK 5.0, so this problem will be fixed.
Vladimir Kondratyev
 
Posts: 1451
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 14 guests