Hi,
When doing a cpu-tracing, I want to measure the invocation counts of some methods which take negligible time to execute.
How can we accomplish this?
One work around that worked is : When I had patched these methods by introducing a delay of 500ms, these methods showed up in the snapshot. But I'm constrained from doing this. Is there any configuration on yourkit side, which will enable me to see methods with negligible execution time in the snapshot?
I have tried the following so far and it didn't work:
a. set adaptive tracing to false in the tracing settings
b. explicitly mentioned the methods in the tracing settings
below is the tracing settings file:
----------------------------------------------------------------------------------------------------------
walltime=com.monitor.external.pal.PALStatisticFinder : get*Count(*)
walltime=com.monitor.external.pal.PALStatisticFinderImpl : get*Count(*)
cputime=com.monitor.external.pal.PALStatisticFinder : get*Elapsed(*)
cputime=com.monitor.external.pal.PALStatisticFinderImpl : get*Elapsed(*)
walltime=*
adaptive=false
adaptive tracing falise
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: adaptive tracing falise
"adaptive=false" is the right thing to do in your case. Setting "walltime" is about choosing how time is measured. Using "walltime=*" should be OK for your task. Setting other "walltime" patterns in addition to "walltime=*" is useless.
What sort of methods do you want to measure? Can you provide an example of such method's body?
Profiling may may skip bytecode instrumentation of primitive methods such as getters and setters to reduce profiling overhead.
Please also consider the method call count mode:
https://www.yourkit.com/docs/java/help/cpu_intro.jsp
What sort of methods do you want to measure? Can you provide an example of such method's body?
Profiling may may skip bytecode instrumentation of primitive methods such as getters and setters to reduce profiling overhead.
Please also consider the method call count mode:
https://www.yourkit.com/docs/java/help/cpu_intro.jsp
-
- Posts: 3
- Joined: Mon Jun 11, 2018 8:07 am
Re: adaptive tracing falise
Thankyou Anton for the tips.
Yes, my method is a simple getter.
public final PALStatistic getOtherIOCount() {return mOtherIOCount;}
I have tried cpu-call-counting profile as well and this method didn't show up there as well.
Is there any other way, we could get the invocation count of the above method in my tracing snapshot?
Praneeth
Yes, my method is a simple getter.
public final PALStatistic getOtherIOCount() {return mOtherIOCount;}
I have tried cpu-call-counting profile as well and this method didn't show up there as well.
Is there any other way, we could get the invocation count of the above method in my tracing snapshot?
Praneeth
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: adaptive tracing falise
Please specify the agent startup option "_instrument_all_methods".
How to specify an option: https://www.yourkit.com/docs/java/help/ ... ptions.jsp
How to specify an option: https://www.yourkit.com/docs/java/help/ ... ptions.jsp