1

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?

Antoine CHAMBILLE
  • 1,676
  • 2
  • 13
  • 29

2 Answers2

3

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.

  • In my case, on my Windows machine Eclipse runs the application with: C:\tools\jdk_1.7.0u40\bin\javaw.exe That's the JDK alright, but could the cause of the issue be that javaw.exe is used and not java.exe ? – Antoine CHAMBILLE Jan 23 '14 at 14:26
  • 1
    You're right. Latest VTune's update does not treat javaw.exe as a valid target to attach. You need use java.exe. – Denis Pravdin Feb 11 '14 at 11:42
  • Thanks Denis, that was indeed the issue, the profiler attached properly once I configured Eclipse to launch with java.exe. – Antoine CHAMBILLE Feb 13 '14 at 17:09
1

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.

Julien
  • 1,302
  • 10
  • 23