oracle / visualvm

VisualVM is an All-in-One Java Troubleshooting Tool
https://visualvm.github.io/
Other
2.79k stars 297 forks source link

CPU Sampler Results Not Reset For a New Session #560

Closed jisedlac closed 3 months ago

jisedlac commented 3 months ago

I have an application which only invokes its code on a request (user action). I've configured a CPU Sampler session for it to only profile its classes (com.example.*).

When I start the CPU Sampler session, the results are initially empty. Then I invoke the request to execute some application code and I can see the results. Till now everything works as expected.

Now I stop the CPU Sampler session session, and start it again. I can still see the results from the previous session, which is misleading. Only after I invoke a request again to execute the application code, the new results will replace those from the previous session.

The expected behavior is to have the data from the previous CPU Sampler session reset when new session is starting, and see empty results for the new session as long as no application code is being executed.

thurka commented 3 months ago

Fixed in master.