Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualVM cannot perform profiling under Windows XP

Tags:

java

visualvm

I'm a new user of VisualVM; nice tool, but i'm currently not able to use the profile and check what variables are allocated. Here is the problem.

In order to use the profile i have to make a calibration, that was not done at the first VisualVM start. First, i tried to go in Tools/Options on the main menu, then I've clicked on Manage. After this i've selected the JDK i'm currently using with my Eclipse Kepler IDE. The selected file is located in G:\JavaJdk\jdk1.7.0_67\bin\java.exe.

When i click on calibrate, VisualVM stucks saying "Connecting to the target VM". Nothing happens: by clicking on Cancel in get an empty window that says "Data transfer error during instrumentation calibration", and after this another window titler "Error" with no error displayed.

Launching a java process and clicking on it from the main VisualVM window I'am able to click on the Profiler Tab: clicking on the Memory button it says that a calibration must be performed, so i click the Ok button but it stucks again at the connection step. Clicking on Cancel i get the same data transfer error, and then "Profile calibration data file does not exists", the machinedata.jdk17 file cannot be found.

My OS is Windows XP, and the VisualVM version is 1.3.8. I've closed sjype, antivirus, Apache, and disabled windows firewall Please tell me if you need any detail.

like image 285
mark Avatar asked Aug 01 '26 20:08

mark


1 Answers

I had the same problem on Windows 7 with JDK 8. What finally helped me is to start the Profiler Agent manually, as described in this post in German.

  • Notice the ProfilerServer and its PID in VisualVM java process list when it tries to start the calibration.
  • Look up the full command line in procexp.exe or some other tool. In my case, it was:

    "C:\Program Files\Java\jdk1.8.0_91\bin\java.exe" "-agentpath:C:/Program Files/VisualVM/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll" "-Xbootclasspath/a:C:\Program Files\VisualVM\profiler\lib\jfluid-server.jar;C:\Program Files\VisualVM\profiler\lib\jfluid-server-15.jar" org.netbeans.lib.profiler.server.ProfilerServer "C:/Program Files/VisualVM/profiler/lib/deployed/jdk16/windows-amd64" 5141 10 ____Profiler+Calibration+Run____

  • Run that exact command line manually.

  • Start VisualVM, go to Tools -> Options -> Manage, run the calibration, it should work.
like image 73
Valentyn Danylchuk Avatar answered Aug 07 '26 11:08

Valentyn Danylchuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!