Skip to main content

Help with converting from JVMPI to JVM TI

2 replies [Last post]
Joined: 2004-09-03

This article provides some help with converting JVMPI usage to the new JVM TI.

This JVMPI interface will be removed in Mustang at some point.

If anyone has any JVMPI conversion issues that the article didn't cover I'd be curious what those are.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-09-03

Creating a single native agent library that uses both JVMPI and JVMTI and also works with both older J2SE's too turns out to be a bit trickier than expected. People who are crazy enough to do this might try:

export JAVA_TOOL_OPTIONS="-agentlib:profiler"
java -Xrunprofiler Application

As JAVA_TOOL_OPTIONS is not understood by pre-5.0 releases it means the command line is only -Xrunprofiler so JVM_OnLoad is invoked. With 5.0 both Agent_OnLoad and JVM_OnLoad will be invoked.

Good Luck.

(Thanks Alan).


Joined: 2003-06-15

As with the other HProf document.. this is great stuff