Using VisualVM with IntelliJ

I am trying to use VisualVM with IntelliJ to profile a Java application. I have the VisualVM Launcher plugin installed inside IntelliJ. I press the play button with an orange circle in IntelliJ, which launches VisualVM and opens the process when the launch starts. However, when I try to profile the processor, it seems that it does not profile the methods in my program. I tried with several different programs and cannot get them to work with VisualVM. This is what VisualVM looks like:

enter image description here

It seems that the profiler believes that the total time is 857 ms or 6.21 ms, although in fact my program takes about a minute to start. It seems to be capturing "DestroyJavaVM", which is not my program. I use VisualVM because it is the only free Java profiler I can find. Any suggestions? Here are my VisualVM settings:

enter image description here

+12
source share
1 answer

As others have suggested, take a look at the β€œStart profiling from class” setting.

But you can consider the timing. As you can see in the background, the process you want to debug is already completed.

Check in the call tree and in the process list on the left that you are debugging. In your screenshot, you are debugging the destruction of the JVM. This does not include your code, so you should not see it there.

0
source

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


All Articles