Arry Arry - 8 months ago 53
Java Question

Java application profiling

I am looking for a Java code profiler which I can use to profile my application (its a service which runs in backend) on production (so means low over head, and it must not slow down my application). Primarily I want calling tree profiling, that is if a() calls b() and then b() calls c(), then how much time a() b() and c() took, both inclusively and exclusively.

Have seen

, but this is not what I am looking for, because I cannot tie my production application to them as it will cause a major performance issue.

Also, I did go through
(, but it does not give me a functionality to profile the calling tree.

( type library is what I need, as it gives calling tree profiling functionality and advanced options like avoiding calling cycles (recursion). But I am not sure that Callgrind can be used on production as it dumps data when program terminates.

Can anyone suggest good calling tree profiler for java that can be used on production without compromising the performance?

Answer Source

Take a look at Java Mission Control in conjunction with Flight Recorder. Starting with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM, so it is highly integrated and purports to have small effects on run-time performance. I have only just started looking at it, and I do see some call tree functionality.

enter image description here