1

I have used JProfiler, JProbe, AppSight, YourKit for the finding out what code is consuming CPU. But YourKit looks better than others.

Is there anything better ?

Fazeel
  • 11
  • 1
  • 1
    YourKit is the best I have ever tried. – J-16 SDiZ Nov 09 '10 at 04:50
  • Only worked with JProfiler. It does such a nice job of profiling our Apache + GWT applications that we never even bothered trying something else. I'm also interested in the answers from your question. Thanks! – Nico Huysamen Nov 09 '10 at 06:21
  • Here is a [similar SO thread](http://stackoverflow.com/questions/948549/open-source-java-profilers) that might be helpful. – Adeel Ansari Nov 09 '10 at 04:51

2 Answers2

1

There is jvisualvm in the Sun 6 JDK. It is "better" because it is gratis and easy to use, pretty simple but has the killer feature of being able to attach to a program which is already running. It is a stand alone version of the NetBeans profiler which is also gratis.

If "better" includes price, these are hard to beat.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
  • Thanks for replying. I had used NetBeans profiler long time back (maybe 1.5 yrs). It was good for memory profiling but not for cpu timings. Does it now work fine for timings also ? – Fazeel Nov 09 '10 at 11:59
0

You cannot ask which is better unless you define what you mean by "better". Basically it's horses for courses. Everyone has their own preferences as to which is the best tool and for what reasons.

There are the main tools I've seen, but it's up to you which you prefer.

drekka
  • 20,957
  • 14
  • 79
  • 135
  • Thanks, for replying. Better for me includes ease of use and setup & accurate cpu profiling. Yourkit has 2 modes for profiling: Sampling (High level) and Tracing(in-depth cpu timings). It works wonders in the Sampling mode and you are able to find out most of the cpu guzzling code from it. However for more detailed analysis you have to run in Tracing mode. Even after running with filters in this mode, the timings are nowhere near the real timings. I had tried JProbe and it was not accurate even in the high level mode. – Fazeel Nov 09 '10 at 11:54
  • I just checked out VisualVM as I didn't know it could attach to a process without that process needed a restart. Smart. Also nice that it comes with Java. But as for detailed features, I don't know. I've only used profiling tools to do basic analysis, usually hunting for memory leaks. – drekka Nov 09 '10 at 23:19