Class GCProfiler.HotspotAllocationSnapshot

  • Enclosing class:
    GCProfiler

    static class GCProfiler.HotspotAllocationSnapshot
    extends java.lang.Object
    • Constructor Detail

      • HotspotAllocationSnapshot

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

      • 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