Class GCProfiler.HotspotAllocationSnapshot

java.lang.Object
org.openjdk.jmh.profile.GCProfiler.HotspotAllocationSnapshot
Enclosing class:
GCProfiler

static class GCProfiler.HotspotAllocationSnapshot extends Object
  • Field Details

  • Constructor Details

    • HotspotAllocationSnapshot

      private HotspotAllocationSnapshot(long[] threadIds, long[] allocatedBytes)
  • Method Details

    • subtract

      public long subtract(GCProfiler.HotspotAllocationSnapshot other)
      Estimates allocated bytes based on two snapshots. The problem is threads can come and go while performing the benchmark, thus we would miss allocations made in a thread that was created and died between the snapshots.

      Current thread is intentionally excluded since it believed to execute jmh infrastructure code only.

      Returns:
      estimated number of allocated bytes between profiler calls