Sethiel
Sethiel

Reputation: 312

Advanced Java profiling

Our company is currently looking for a Java profiler. We got an offer from Compuware (dynaTrace product) which is capable of giving this kind of output for CPU profiling (example):

(ok, I cannot post images, the rest of the question should be clear without this picture)

What dynaTrace gives you is a list of all calls of a specific method with exact information about how much wall time each call took, how much of that was CPU time and how much was waiting for IO. This (in my opinion very simple) info is very important and is what we absolutely need.

Now, the question is ... what other profiler is actually capable of giving this king of information?

I tried VisualVM (that comes with JDK), YourKit and JProfiler. I didn't find any way to produce this output with any of them.

These two features are essential for us in a profiler. If anyone knows a product that offers them, please tell, I'd be very grateful.

Of course, it's very possible that some of the mentioned profilers has these features and I didn't find out how to do it in the limited time I had to research them.

Upvotes: 4

Views: 3329

Answers (2)

Sethiel
Sethiel

Reputation: 312

After a lot more investigating the answer is very simple: none of the mentioned profilers are capable of what I wanted in this question - not VisualVM, not YourKit and not JProfiler.

So if you want this kind of information, your best bet is probably BTrace, which is free and, in combination with JMX, capable of measuring pretty much anything. Quite literally - you have access to all method calls including all parameters and you can do whatever you can code in Java.

It also has very good examples included with the release so you will be able to understand the concept and customize the measuring within an hour.

Upvotes: 1

Ingo Kegel
Ingo Kegel

Reputation: 48105

While JProfiler does not display it this way, it has a notion of thread states and the CPU views have a thread state selector in the top right corner. This screen cast shows the effect of switching thread state. By default, JProfiler shows the "Runnable" state, not the wall time ("All states").

Upvotes: 0

Related Questions