Profiling VisualVM profiles on Mac?

I am trying to use VisualVM to profile on a Mac with a 64-bit virtual machine, but I have no success.

It seems to be updated only with the LONG interval (I thought that he would not have a profile at all until I left the keyboard for ten minutes and returned and found an ONE update. It should work every 2 seconds, I think).

In most cases, he just sits with the message "No profiling data." Once it worked, it found 4 invocation methods, total. Millions would occur in this period of time.

The snapshot when the application exits shows some system threads, but none of my codes.

I have not changed any of the default settings. I checked it, not excluding my code.

Does VisualVM work on Mac to profile a 64-bit JVM?

I tried both jvisualvm from the latest JDK, and a bit later from java.net.

java version "1.6.0_22" Java (TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261) Java HotSpot (TM) 64-bit server VM (build 17.1-b03-307, mixed mode)

System Version: Mac OS X 10.6.4 (10F569)

Any thoughts? Does it work for you?

Thank!

+3
source share
1 answer

Pilot error.

I compared the test application that created the thread and rotated in a loop in the thread start method. He used a tight loop to use the processor, as well as sleep () and println ().

, . , VisualVM . , , .

run() , run(), .

+2

Source: https://habr.com/ru/post/1773125/


All Articles