< prev index next >

src/hotspot/share/gc/shared/collectorCounters.hpp

Print this page

        

*** 69,87 **** protected: CollectorCounters* _c; public: inline TraceCollectorStats(CollectorCounters* c) : ! PerfTraceTimedEvent(c->time_counter(), c->invocation_counter()), _c(c) { ! if (UsePerfData) { _c->last_entry_counter()->set_value(os::elapsed_counter()); } } inline ~TraceCollectorStats() { ! if (UsePerfData) _c->last_exit_counter()->set_value(os::elapsed_counter()); } }; #endif // SHARE_VM_GC_SHARED_COLLECTORCOUNTERS_HPP --- 69,90 ---- protected: CollectorCounters* _c; public: inline TraceCollectorStats(CollectorCounters* c) : ! PerfTraceTimedEvent((c == NULL) ? NULL : c->time_counter(), ! (c == NULL) ? NULL : c->invocation_counter()), _c(c) { ! if (UsePerfData && (_c != NULL)) { _c->last_entry_counter()->set_value(os::elapsed_counter()); } } inline ~TraceCollectorStats() { ! if (UsePerfData && (_c != NULL)) { ! _c->last_exit_counter()->set_value(os::elapsed_counter()); ! } } }; #endif // SHARE_VM_GC_SHARED_COLLECTORCOUNTERS_HPP
< prev index next >