Profiling the execution in the VM
xerxes at zafena.se
Tue Jun 16 01:03:20 PDT 2009
Mario Mendez-Lojo skrev:
> Hi guys,
> First of all, this is a generic question so please redirect me to the
> right list (I just couldn't find one) if you consider my post off-topic.
> Our project requires of detailed profiling (memory, cpu) of a set of
> Java applications. The information we get out of -Xprof is not enough.
> We have been using JProfiler, and are quite happy with it. But we
> wonder if there is a better, or at least open source, alternative. Can
> you recommend any other good profiler?
> Thank you very much,
> Mario Mendez-Lojo
> ICES dpt, UT Austin, TX
Four free software profiling alternatives pops into my mind that might
solve your needs:
VisualVM are quite good for regular java (cpu, memory, threads) program
profiling it can attach to already running JVM's and are a breeze to
use. This are the same profiler used in NetBeans.
If you want a system wide profiler then use oprofile. It can display
detailed information of the JVM, system library and the kernel calls
without having to modify the JVM in any special way.
If you want even more detail of what the JVM are doing then you can use
gprof (part of gnu binutils) or systemtap, both requires that the JVM
are modified in order to insert the profiling hooks.
http://sourceware.org/binutils/docs-2.19/gprof/index.html (part of gnu
- example of information gathered with gprof
Systemtap hooks can easily be inserted into the OpenJDK hotspot by
building it using the Icedtea infrastructure and adding
--enable-systemtap to icedtea's configure.
More information about the hotspot-dev