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

How to know which method is calling a specific method?

Moderators: Vladimir Kondratyev, Anton Katilin

How to know which method is calling a specific method?

Postby javadevmtl » Wed Aug 05, 2020 2:01 am

Hi running the profiler. I see that

java.util.HashSet.add

Time(ms): 49,000(91%)
Own Time(ms): 49,000

-1 Does that mean that this is taking up CPU, because it seems I have high CPU usage 50%+ , when I restart the application the CPU usage is low, even with same amount of load?
-2 How can I see who is calling the add of the HashSet?

GC looks good, memory seems to clean up.
javadevmtl
 
Posts: 2
Joined: Wed Aug 05, 2020 1:53 am

Re: How to know which method is calling a specific method?

Postby Anton Katilin » Wed Aug 05, 2020 5:17 am

Hi,

-1 Does that mean that this is taking up CPU, because it seems I have high CPU usage 50%+

Yes, why not.
However, since you apparently use synchronous sampling, there is likely a bias:
https://www.yourkit.com/docs/java/help/sampling.jsp

To avoid it, try asynchronous sampling if it's available on your platform:
https://www.yourkit.com/docs/java/help/ ... ng_cpu.jsp

-2 How can I see who is calling the add of the HashSet?

https://www.yourkit.com/docs/java/help/ ... traces.jsp
Anton Katilin
 
Posts: 6009
Joined: Wed Aug 11, 2004 8:37 am

Re: How to know which method is calling a specific method?

Postby javadevmtl » Fri Aug 07, 2020 3:08 pm

I don't see Hotspots item on the left to see the call trace. I assume I need a snapshot for that to work?

I took some screens...

https://www.dropbox.com/sh/ejcddp2gcml8qz2/AAD_VfUecE0hSNZX7wGbfDh3a?dl=0

This is on low application usage, usually the CPU is at 1% user time eventually it will go higher to 50% and more at which point the application slows down and I have to restart it.

From what I have seen the GC is low and memory does reclaim itself correctly.
javadevmtl
 
Posts: 2
Joined: Wed Aug 05, 2020 1:53 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

cron

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.