Content received from: http://JavaFAQ.nu/java-article417.html
How does JVM interact with profilers?
Tuesday, March 09, 2004 (00:00:00)
Posted by jalex
Question: How does JVM interact with profilers?
Answer: The Java Virtual Machine has Profiler Interface (JVMPI) in
the Java 2 SDK, Standard Edition. This interface is an experimental feature in
the Java 2 SDK. The JVMPI is not yet a standard profiling interface. It is
intended for tools vendors to develop profilers that work in conjunction with
Sun's Java virtual machine implementation.
"The JVMPI is a two-way function call interface between the Java virtual machine
and an in-process profiler agent. On one hand, the virtual machine notifies the
profiler agent of various events, corresponding to, for example, heap
allocation, thread start, etc. On the other hand, the profiler agent issues
controls and requests for more information through the JVMPI. For example, the
profiler agent can turn on/off a specific event notification, based on the needs
of the profiler front-end.
The profiler front-end may or may not run in the same process as the profiler
agent. It may reside in a different process on the same machine, or on a remote
machine connected via the network. The JVMPI does not specify a standard wire
protocol. Tools vendors may design wire protocols suitable for the needs of
different profiler front-ends.
A profiling tool based on JVMPI can obtain a variety of information such as
heavy memory allocation sites, CPU usage hot-spots, unnecessary object
retention, and monitor contention, for a comprehensive performance analysis.
JVMPI supports partial profiling, i.e. a user can selectively profile an
application for certain subsets of the time the virtual machine is up and can
also choose to obtain only certain types of profiling information.
In the current version of JVMPI, only one agent per virtual machine can be
supported." Details can be found here: