< prev index next >

src/hotspot/share/runtime/perfData.hpp

Print this page

        

*** 914,939 **** // pointer to thread-local or global recursion counter variable int* _recursion_counter; public: inline PerfTraceTime(PerfLongCounter* timerp) : _timerp(timerp), _recursion_counter(NULL) { ! if (!UsePerfData) return; _t.start(); } inline PerfTraceTime(PerfLongCounter* timerp, int* recursion_counter) : _timerp(timerp), _recursion_counter(recursion_counter) { ! if (!UsePerfData || (_recursion_counter != NULL && ! (*_recursion_counter)++ > 0)) return; _t.start(); } ! inline void suspend() { if (!UsePerfData) return; _t.stop(); } ! inline void resume() { if (!UsePerfData) return; _t.start(); } inline ~PerfTraceTime() { ! if (!UsePerfData || (_recursion_counter != NULL && ! --(*_recursion_counter) > 0)) return; _t.stop(); _timerp->inc(_t.ticks()); } }; --- 914,939 ---- // pointer to thread-local or global recursion counter variable int* _recursion_counter; public: inline PerfTraceTime(PerfLongCounter* timerp) : _timerp(timerp), _recursion_counter(NULL) { ! if (!UsePerfData || (_timerp == NULL)) return; _t.start(); } inline PerfTraceTime(PerfLongCounter* timerp, int* recursion_counter) : _timerp(timerp), _recursion_counter(recursion_counter) { ! if (!UsePerfData || (_timerp == NULL) || ! (_recursion_counter != NULL && (*_recursion_counter)++ > 0)) return; _t.start(); } ! inline void suspend() { if (!UsePerfData || (_timerp == NULL)) return; _t.stop(); } ! inline void resume() { if (!UsePerfData || (_timerp == NULL)) return; _t.start(); } inline ~PerfTraceTime() { ! if (!UsePerfData || (_timerp == NULL) || ! (_recursion_counter != NULL && --(*_recursion_counter) > 0)) return; _t.stop(); _timerp->inc(_t.ticks()); } };
*** 961,976 **** protected: PerfLongCounter* _eventp; public: inline PerfTraceTimedEvent(PerfLongCounter* timerp, PerfLongCounter* eventp): PerfTraceTime(timerp), _eventp(eventp) { ! if (!UsePerfData) return; _eventp->inc(); } inline PerfTraceTimedEvent(PerfLongCounter* timerp, PerfLongCounter* eventp, int* recursion_counter): PerfTraceTime(timerp, recursion_counter), _eventp(eventp) { ! if (!UsePerfData) return; _eventp->inc(); } }; #endif // SHARE_VM_RUNTIME_PERFDATA_HPP --- 961,976 ---- protected: PerfLongCounter* _eventp; public: inline PerfTraceTimedEvent(PerfLongCounter* timerp, PerfLongCounter* eventp): PerfTraceTime(timerp), _eventp(eventp) { ! if (!UsePerfData || (timerp == NULL)) return; _eventp->inc(); } inline PerfTraceTimedEvent(PerfLongCounter* timerp, PerfLongCounter* eventp, int* recursion_counter): PerfTraceTime(timerp, recursion_counter), _eventp(eventp) { ! if (!UsePerfData || (timerp == NULL)) return; _eventp->inc(); } }; #endif // SHARE_VM_RUNTIME_PERFDATA_HPP
< prev index next >