< prev index next >

src/hotspot/share/runtime/perfData.cpp

Print this page
@@ -525,5 +525,12 @@
    assert(copy != nullptr, "just checking");
  
    return copy;
  }
  
+ PerfTraceTimeBase::~PerfTraceTimeBase() {
+   if (!UsePerfData || !_t->is_active()) return;
+   if (_counter != nullptr) {
+     _t->stop();
+     _counter->inc(_t->ticks());
+   }
+ }
< prev index next >