Open
Description
Describe the bug
We noticed that in the GC logs of the Java process that there is a GC_HeapInspection
event triggered just by opening up the "Sampler" tab in VisualVM. I think this is perhaps due to a JFR that gets eagerly captured on clicking this tab that ends up being extremely expensive and can stop out the Java process as it inspects the heap.
To Reproduce
Steps to reproduce the behavior:
- Grep for
GC_HeapInspection
in GC logs
(flags)
gc+stats=debug,gc+alloc=debug,safepoint=info,ergo=info,free=info,director=info:file=gc.log
- Should see no results initially.
- Connect via JMX to the process.
- Again, grep for
GC_HeapInspection
, should see no results upon initial connect. - Click the "Sampler" tab.
- Grep for
GC_HeapInspection
. Should see a log entry for this.
Expected behavior
Just clicking on the tab should not trigger anything. This would only be expected on actually trying to sample memory or CPU.
Desktop (please complete the following information):
- OS:MacOS 15.3
- JDK version: 17.0.11; OpenJDK 64-Bit Server VM (17.0.11+9-LTS, mixed mode, sharing)
- Version: 2.1.10 (Build 240911)