< prev index next >

src/hotspot/share/runtime/perfData.cpp

Print this page
*** 294,11 ***
    if (_all == nullptr) {
      _all = new PerfDataList(191);
      _has_PerfData = true;
    }
  
!   assert(!_all->contains(p->name()), "duplicate name added");
  
    // add to the list of all perf data items
    _all->append(p);
  
    if (p->variability() == PerfData::V_Constant) {
--- 294,11 ---
    if (_all == nullptr) {
      _all = new PerfDataList(191);
      _has_PerfData = true;
    }
  
!   assert(!_all->contains(p->name()), "duplicate name added: %s", p->name());
  
    // add to the list of all perf data items
    _all->append(p);
  
    if (p->variability() == PerfData::V_Constant) {

*** 525,10 ***
    assert(copy != nullptr, "just checking");
  
    return copy;
  }
  
! PerfTraceTime::~PerfTraceTime() {
!   if (!UsePerfData) return;
!   _t.stop();
!   _timerp->inc(_t.ticks());
  }
--- 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 >