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

[EAP 606] Weird time values

Moderators: Vladimir Kondratyev, Anton Katilin

[EAP 606] Weird time values

Postby pepijnve » Wed May 25, 2005 10:24 am

I'm seeing some CPU profiling results that I don't quite understand.
I see
A.a 79%
B.b 25%
So now I'm wondering where the other 54% went. I read in another post that this can be due to A.a consuming CPU time itself, however if I check the implementation of this method it simply calls a method on a different object of a different class. In fact this method call is in fact between A.a and B.b. Any idea why this is missing?
The CPU snapshot was made using method tracing btw.
pepijnve
 
Posts: 21
Joined: Tue May 17, 2005 1:38 pm
Location: Leuven, Belgium

Postby pepijnve » Wed May 25, 2005 10:30 am

Some further clarifications:
- I'm using the Invocation tree by threads view
- There are in fact quite a few method calls in between A.a and B.b. It seems unlikely that the jit is inlining all of them.
- None of these missing method calls are in the filter list
pepijnve
 
Posts: 21
Joined: Tue May 17, 2005 1:38 pm
Location: Leuven, Belgium

Postby Vladimir Kondratyev » Wed May 25, 2005 12:49 pm

Sorry, but I do not understand your call tree. Please send your call tree (exported to HTML) with description of the problem to [email protected]
Vladimir Kondratyev
 
Posts: 1519
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Postby pepijnve » Fri May 27, 2005 1:15 pm

If I understand correctly this is due to the combination of JVMPI not supporting byte code manipulation and the dynamic byte code manipulation performed by yourkit. Or does the JVMPI also not fire method entered/exit events in case of inlined methods?
If my assumption is correct, doesn't this severly limit the accuracy of the profiler. I realize this is for performance reasons, but to me accurate results are more important than raw speed...
pepijnve
 
Posts: 21
Joined: Tue May 17, 2005 1:38 pm
Location: Leuven, Belgium

Postby Anton Katilin » Fri May 27, 2005 6:01 pm

This is because we used method entry/exit events provided by JVMPI, that are not always issued.

Since everything is fine in Java 5.0's JVMTI, this is not a very big problem IMO. There are so many reasons why to migrate to Java 5.0, so I believe more and more people will do it...
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby pepijnve » Mon May 30, 2005 8:10 am

While I would personally prefer to migrate to 5.0, management thinks otherwise for unknown reasons. Is this 'problem' fixed if I run using -Xint?
pepijnve
 
Posts: 21
Joined: Tue May 17, 2005 1:38 pm
Location: Leuven, Belgium

Postby Anton Katilin » Mon May 30, 2005 8:23 am

Yes, -Xint should solve this particular problem. But it will raise another problem - profiled application will run much slower.

If it's suitable for you, I'd suggest to profile with Java 5.0. Performance optimizations made based on profiling results collected running application with Java 5.0 will most likely be adequate for production system running Java 1.4 or 1.3, because most of bottlenecks are induced by own code of application, not by JDK it runs under.

-Xint produces correct stack traces, but times can be very different from real times (i.e. when HotSpot JVM is on). I wouldn't suggest to rely much on times produced with -Xint
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby pepijnve » Mon May 30, 2005 9:42 am

Unfortunately, the code I have to work on does not run under 5.0 because someone deemed it necessary to use com.sun classes which have changed between 1.4 and 5.0 :(
I am curious now though why some coworkers of mine are not seeing this kind of behaviour with a different java profiler?
pepijnve
 
Posts: 21
Joined: Tue May 17, 2005 1:38 pm
Location: Leuven, Belgium


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.