Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

eap build 524 - How do I enable JVMTI?

Moderators: Vladimir Kondratyev, Anton Katilin

eap build 524 - How do I enable JVMTI?

Postby drabe » Mon Feb 07, 2005 8:53 pm

When I run, I get the message:
[YourKit Java Profiler 4.0 EAP build 524] Using JVMPI
[YourKit Java Profiler 4.0 EAP build 524] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 4.0 EAP build 524] Listening on port 1229...

I installed (and believe I am using) JDK 1.5.0_01. My app writes out some info about its environment:
Java Version: 1.5.0_01, Sun Microsystems Inc.
Java VM: Java HotSpot(TM) Server VM, mixed mode
Java Max Heap Size: 530907136
Java Home: C:\Program Files\Java\jdk1.5.0_01\jre

How can I force it to use JVMTI?
Thanks.
drabe
 
Posts: 4
Joined: Mon Feb 07, 2005 8:50 pm

Postby Sascha Weinreuter » Mon Feb 07, 2005 10:21 pm

Here's what I found in the help files (%yp-home%/docs/agent.htm). Seems you have to use a different JVM parameter to specify the profiler agent to use.

Step 2: add appropriate VM parameter to the command line of Java application

The parameter depends on Java version.

To use Java 1.3 or 1.4 with JVMPI API, use -Xrunyjpagent parameter

E.g.: java -Xrunyjpagent FooClass

To use Java 5.0 or higher with JVMTI API, use -agentlib:yjpagent parameter

E.g.: java -agentlib:yjpagent FooClass

Java 5.0 note: Java 5.0 supports both deprecated JVMPI API and new JVMTI API. It is desired to use JVMTI when possible. Java 5.0 supports both -agentlib:yjpagent (uses new JVMTI API) and -Xrunyjpagent (uses deprecated JVMPI) parameters. Please make sure -agentlib:yjpagent is specified.



BTW: I think I haven't seen a switch for that in the IDEA integration. Is this only shown (or default) when using JDK 5 or has this to be configured manually?

Sascha
Sascha Weinreuter
 
Posts: 46
Joined: Mon Jan 24, 2005 3:01 pm
Location: Germany

Postby drabe » Mon Feb 07, 2005 10:40 pm

Thanks, that was it!

I noticed that method tracing seems to be much slower with JVMTI than with JVMPI. Has anybody else noticed that? Is it expected?

--Dan
drabe
 
Posts: 4
Joined: Mon Feb 07, 2005 8:50 pm


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.