Profiling java application with Intel VTune Amplifier XE 2013

1.5k views Asked by At

I want to profile java multicore algorithms with Intel VTune Amplifier XE 2013 (the latest update 15 applied).

For that I launch java applications from Eclipse, using the Oracle JDK 1.7.0_40 (64 bits), and then I attach the vtune profiler to the running java process. The operating system is Windows 8.1 x64. The collection of statistics by vtune works, but apparently vtune cannot properly attach to the JVM so that most recorded function calls are marked as "outside of any known module". And before it starts the collection, the VTune collector reports the following warning:

Warning: Cannot profile the managed part of the target process.
There is no Java* Attach API available. Only native part of the target process will be profiled.
Suggestion: Make sure your application is running under JDK 1.6 or higher. 

Has someone been through this and found the way to enable full java profiking with VTune?

2

There are 2 answers

3
Denis Pravdin On BEST ANSWER

Well, Eclipse is using JDK, but what does your java app use JDK or JRE? Could you please look over? Your application should use JDK but not JRE in order to Intel VTune Amplifier XE 2013 can attach to java process. Thanks.

0
Julien On

My process is the following to profile with vTune :

  1. Export application as a runnable JAR with dependencies
  2. Create a .bat file like this : java -Xcomp -jar myjar.jar
  3. In vTune select your .bat file as the application to launch.

This works perfectly with multiple JDK/JRE installed on windows 7.

Note : this solution won't work for a server application.