简体   繁体   中英

VisualVM cannot perform profiling under Windows XP

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.

Try to use VisualVM 1.3.7, which was released before Windows XP support was discontinued. You can download VisualVM 1.3.7 here

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM