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
Profiler must be started before profiled application
-
- Posts: 8
- Joined: Tue Sep 14, 2004 2:47 pm
-
- Posts: 8
- Joined: Tue Sep 14, 2004 2:47 pm
additional info
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
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm
Re: Profiler must be started before profiled application
yjpagent has additional parameters to enable profiling just from JVM start.Morten Buhr wrote:If I do not start the profiler before the application I wish to profile, the resulting profile data is not reliable.
Please take a look at -Xrunyjpageht:help to lear more about profiler options.
All profiling results are in millisecondsMorten 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.
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.Morten Buhr wrote:It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.
-
- Posts: 8
- Joined: Tue Sep 14, 2004 2:47 pm
Re: Profiler must be started before profiled application
Morten Buhr wrote:If I do not start the profiler before the application I wish to profile, the resulting profile data is not reliable.
I know, but I do not want to start profiling until my application is fully up and runningVladimir 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.
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.
My mistake - I meant several hundred thousands of milliseconds.Vladimir Kondratyev wrote: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.
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.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.
-
- Posts: 1626
- Joined: Tue Aug 10, 2004 7:52 pm
Re: Profiler must be started before profiled application
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 know, but I do not want to start profiling until my application is fully up and running
Please send us snapshot with such huge CPU usage. We'll try to investigate the problem.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.
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.Morten Buhr wrote:It also seems that the CPU usage when profiling is substantially higher when profiler is not started before the profiled application.