Times don't sum up to 100%

Questions about YourKit Java Profiler
Post Reply
pat
Posts: 2
Joined: Mon Nov 15, 2004 2:29 pm

Times don't sum up to 100%

Post by pat »

Hi

I did a CPU profile using method tracing. When analyzing the statistics I saw that the sum of all times spent in the methods called from within a specific method is only 2% of the time spent in that specific method.

What am I doing wrong?

I heard rumors that this phenomenon occurs when a lot of time is spent within constructors. I heard other rumors that this can be prevented by setting a specific property.

Is any of these rumors true?

Cheers
pat
Vladimir Kondratyev
Posts: 1625
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

The method itself can consume CPU (for example in some "for" loop)
Vladimir Kondratyev
Posts: 1625
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Hot Spot compiler could also inline some simple methods into the body of "caller" method.
pat
Posts: 2
Joined: Mon Nov 15, 2004 2:29 pm

Post by pat »

Vladimir
thanks for your help
Vladimir Kondratyev wrote:The method itself can consume CPU (for example in some "for" loop)
sure, in my example this was obviously not the case (sorry forgot to mention that my "specific method" doesn't do any time consuming calculations, loops, or similar).
Vladimir Kondratyev wrote:Hot Spot compiler could also inline some simple methods into the body of "caller" method.
yeah, read about that. But I'm not using Hot Spot.

However, I found, that after removing all filters and taking the snapshot again...it worked. I now have to find which library I must remove from the filters such that I get the information needed AND good performance when tracing.

Thanks again & cheers
pat

BTW: ease of installation, integration with Idea, and use deserves an award!
Vladimir Kondratyev
Posts: 1625
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

But I'm not using Hot Spot.
Are you using -Xint mode?
I found, that after removing all filters and taking the snapshot again...it worked.
Actually it's strange, because filters are used by profiler UI only and should not affect gathering CPU information.
Post Reply