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.

JVMTI and JVMPI?

Moderators: Vladimir Kondratyev, Anton Katilin

JVMTI and JVMPI?

Postby vsonnathi » Thu May 26, 2005 5:12 pm

Hi,

Is there any way you can turn on JVMTI with Java 5.0? I am running my app with Java 5.0 and here's the status I get

Command line: "C:\jdk1.5.0_03\bin\java" -Xrunyjpagent:sessionname=YJPQUOTED636f6e74616374732d66696c74657220286c61756e636865642066726f6d204944454129,profileruipath=YJPQUOTED433a5c50726f6772616d2046696c65735c596f75724b6974204a6176612050726f66696c657220342e3520454150206275696c64203630365c62696e5c796a702e657865,ideport=4656 -DTEMP_STAGE_FOLDER=d:\build\gold\GOLD-src\GOLD-src\temp -DTEMP_STAGE_URL=http://ws6048.ggtest.com:8080/src/test -Djava.endorsed.dirs="C:\tomcat-5.0.27\common\endorsed" -classpath "C:\jdk1.5.0_03\lib\tools.jar;C:\tomcat-5.0.27\bin\bootstrap.jar" -Dcatalina.base="D:\IntelliJ-IRIDA\system\tomcat_contacts-filter_7195e240" -Dcatalina.home="C:\tomcat-5.0.27" -Djava.io.tmpdir="C:\src\tomcat-gold\temp" org.apache.catalina.startup.Bootstrap start
[YourKit Java Profiler 4.5 EAP build 606] Using JVMPI
[YourKit Java Profiler 4.5 EAP build 606] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 4.5 EAP build 606] Listening on port 1323...

Probably this is a very basic question.

Thanks,
--Venkat.
vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby Anton Katilin » Fri May 27, 2005 11:19 am

Hello,

Could you please take a look how JDK is configured in IDEA? In particular, how is it named in the list of JDKs?

Best regards,
Anton
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby Anton Katilin » Fri May 27, 2005 11:37 am

P.S:

JVMTI is used automatically when application is launched from IDE with Java 5.0 or higher. In IntelliJ IDEA, the check is made via IDEA's API call ProjectJDK.getVersionString()

So one of the ideas is that in your case theAPI call returns improper value.

What IDEA version/build do you use?
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby Anton Katilin » Fri May 27, 2005 12:03 pm

Could you please as well post <IDEA settings>/config/options/jdk.table.xml
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby vsonnathi » Fri May 27, 2005 12:11 pm

Hi Anton,

I am using IDEA Irida #3341 build.

Here is the jdk.table.xml:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<application>
  <component name="ProjectJdkTable">
    <jdk version="2">
      <name value="Default" />
      <type value="JavaSDK" />
      <version value="java version &quot;1.4.2&quot;" />
      <homePath value="C:/j2sdk1.4.2" />
      <roots>
        <sourcePath>
          <root type="composite">
            <root type="simple" url="jar://C:/j2sdk1.4.2/src.zip!/" />
          </root>
        </sourcePath>
        <classPath>
          <root type="composite">
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/charsets.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/jce.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/jsse.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/plugin.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/rt.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/sunrsasign.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/ext/dnsns.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/ext/ldapsec.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/ext/localedata.jar!/" />
            <root type="simple" url="jar://C:/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar!/" />
          </root>
        </classPath>
        <javadocPath>
          <root type="composite" />
        </javadocPath>
      </roots>
      <additional />
    </jdk>
    <jdk version="2">
      <name value="Default 1.5" />
      <type value="JavaSDK" />
      <version value="java version &quot;1.5.0_03&quot;" />
      <homePath value="C:/jdk1.5.0_03" />
      <roots>
        <sourcePath>
          <root type="composite">
            <root type="simple" url="jar://C:/jdk1.5.0_03/src.zip!/" />
          </root>
        </sourcePath>
        <classPath>
          <root type="composite">
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/charsets.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/deploy.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/javaws.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/jce.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/jsse.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/plugin.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/rt.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/ext/dnsns.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/ext/localedata.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/ext/sunjce_provider.jar!/" />
            <root type="simple" url="jar://C:/jdk1.5.0_03/jre/lib/ext/sunpkcs11.jar!/" />
          </root>
        </classPath>
        <javadocPath>
          <root type="composite" />
        </javadocPath>
      </roots>
      <additional />
    </jdk>
  </component>
</application>

vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby Anton Katilin » Fri May 27, 2005 12:47 pm

Thank you for the xml.

Everything seems OK with it.

Could you please provide more detail, and step by step instructions how to reproduce what you are doing.

Do you launch your application with Profile action?

What run configuration type is this?
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby vsonnathi » Fri May 27, 2005 1:50 pm

Hi Anton,

I am trying to profile a tomcat (5.0.27) web application with JDK 1.5.0_03. I am also running IDEA with the same JDK. I lauch the application with the Profile Action.

I see the same message in the IDEA console window as well:
[YourKit Java Profiler 4.0.11] Using JVMPI
[YourKit Java Profiler 4.0.11] *** HINT ***: we recommend using Java 5.0 and JVM
TI when possible!
[YourKit Java Profiler 4.0.11] Listening on port 10100...
Execute delete[c:\intellij\config\plugins\unitTest]

I think there is a bug with IDEA ProjectJDK.getVersionString() which you are trying to access.

Let me know if you need more info.

Thanks,
--Venkat.
vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby Anton Katilin » Fri May 27, 2005 2:08 pm

I can see one time you used YourKit Java Profiler 4.0.11, and another time 4.5 EAP.

Which build are you actually using? It's to know important because getVersionString() is used in 4.5, in 4.0 a different approach is used.
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby Anton Katilin » Fri May 27, 2005 2:17 pm

Could you please as well:

1. Make sure you are using YourKit Java Profiler 4.5 EAP (run integrate with IDE action, re-start IDEA...)

2. Delete JDK definition in IDEA

3. Add JDK again
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby vsonnathi » Fri May 27, 2005 4:05 pm

Hi Anton,

The second output was from IDEA's console window which by bundles YourKit 4.0.11 for its memory and cpu snapshot capabilities.

I am using 4.5 EAP to profile my application running inside IDEA (IRIDA).

I tried the sequence you described and here's the output:

Using JAVA_HOME: C:\jdk1.5.0_03
Command line: "C:\jdk1.5.0_03\bin\java" -Xrunyjpagent:sessionname=YJPQUOTED636f6e74616374732d66696c74657220286c61756e636865642066726f6d204944454129 -DTEMP_STAGE_FOLDER=d:\build\gold\GOLD-src\GOLD-src\temp -DTEMP_STAGE_URL=http://ws6048.ggtest.com:8080/src/test -Djava.endorsed.dirs="C:\tomcat-5.0.27\common\endorsed" -classpath "C:\jdk1.5.0_03\lib\tools.jar;C:\tomcat-5.0.27\bin\bootstrap.jar" -Dcatalina.base="D:\IntelliJ-IRIDA\system\tomcat_contacts-filter_7195e240" -Dcatalina.home="C:\tomcat-5.0.27" -Djava.io.tmpdir="C:\src\tomcat-gold\temp" org.apache.catalina.startup.Bootstrap start
[YourKit Java Profiler 4.5 EAP build 606] Using JVMPI
[YourKit Java Profiler 4.5 EAP build 606] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 4.5 EAP build 606] Listening on port 2250...

It is still using JVMPI.

Thanks,
--Venkat.
vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby Anton Katilin » Fri May 27, 2005 4:36 pm

In about an hour there will be next build 608 published.

Could you please use its plugin then.

Each time you use Profile action, the plugin will print into IDEA's console (I mean console of IDEA itself, not console shown in IDEA) debug messages like:

yjp: jdk = ...
yjp: versionString = ...
yjp: useJVMTI = ...

Just curious what are the values in your case.
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby Anton Katilin » Fri May 27, 2005 6:13 pm

FYI: the build is available for download.
Anton Katilin
 
Posts: 5966
Joined: Wed Aug 11, 2004 8:37 am

Postby vsonnathi » Tue May 31, 2005 4:11 pm

Hi,

Here's the output on the IDEA's console:

yjp: jdk = null
yjp: useJVMTI = false
yjp: jdk = null
yjp: useJVMTI = false
yjp: jdk = null
yjp: useJVMTI = false
vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby vsonnathi » Tue May 31, 2005 4:35 pm

Hi,

My telemetry window is blank. Is that because of the above, it is not detecting JDK 1.5?

Thanks,
--Venkat.
vsonnathi
 
Posts: 8
Joined: Thu Jan 13, 2005 5:04 pm

Postby Vladimir Kondratyev » Tue May 31, 2005 6:28 pm

My telemetry window is blank. Is that because of the above, it is not detecting JDK 1.5?


It's known issue. Telemetty window should present only if JVMTI agent is detected. This inconsistency will be fixed in one of upcoming builds.

Regards,
Vladimir
Vladimir Kondratyev
 
Posts: 1519
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Next

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.