src/hotspot/share/jfr/leakprofiler/sampling/objectSample.hpp
changeset 50880 e1117321adaf
parent 50113 caf115bb98ad
child 53244 9807daeb47c4
--- a/src/hotspot/share/jfr/leakprofiler/sampling/objectSample.hpp	Thu Jun 28 15:06:55 2018 +0200
+++ b/src/hotspot/share/jfr/leakprofiler/sampling/objectSample.hpp	Thu Jun 28 15:13:39 2018 +0200
@@ -53,6 +53,7 @@
   int _index;
   size_t _span;
   size_t _allocated;
+  size_t _heap_used_at_last_gc;
   unsigned int _stack_trace_hash;
   bool _dead;
 
@@ -88,6 +89,7 @@
                    _index(0),
                    _span(0),
                    _allocated(0),
+                   _heap_used_at_last_gc(0),
                    _stack_trace_hash(0),
                    _dead(false) {}
 
@@ -164,6 +166,14 @@
     _allocation_time = Ticks(time.value());
   }
 
+  void set_heap_used_at_last_gc(size_t heap_used) {
+    _heap_used_at_last_gc = heap_used;
+  }
+
+  size_t heap_used_at_last_gc() const {
+    return _heap_used_at_last_gc;
+  }
+
   bool has_stack_trace() const {
     return stack_trace_id() != 0;
   }