Yet Another Java Profiler is a profiler tool that
uses the JVMTI interface. It can be used to
selectively trace a Java program and store this
information in a compressed logfile. This logfile
can then later be analyzed using the same tool.
It's also possible to monitor heap/stack usage and
the threads at runtime.