Skip to content

Clicking on Sampler view causes a GC_HeapInspection event #640

Open
@joshb1050

Description

@joshb1050

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:

  1. 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
  1. Should see no results initially.
  2. Connect via JMX to the process.
  3. Again, grep for GC_HeapInspection, should see no results upon initial connect.
  4. Click the "Sampler" tab.
  5. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions