Mercurial > hg > truffle
comparison src/share/vm/services/threadService.hpp @ 875:6a93908f268f
6857194: Add hotspot perf counters to aid class loading performance measurement
Summary: Add new jvmstat counters to measure detailed class loading time
Reviewed-by: acorn, kamg
author | mchung |
---|---|
date | Fri, 10 Jul 2009 11:10:00 -0700 |
parents | ad8c8ca4ab0f |
children | 89e0543e1737 |
comparison
equal
deleted
inserted
replaced
812:85d0690f7d12 | 875:6a93908f268f |
---|---|
118 // to update the statistics. | 118 // to update the statistics. |
119 bool _count_pending_reset; | 119 bool _count_pending_reset; |
120 bool _timer_pending_reset; | 120 bool _timer_pending_reset; |
121 | 121 |
122 // Keep accurate times for potentially recursive class operations | 122 // Keep accurate times for potentially recursive class operations |
123 int _class_init_recursion_count; | 123 int _perf_recursion_counts[6]; |
124 int _class_verify_recursion_count; | 124 elapsedTimer _perf_timers[6]; |
125 int _class_link_recursion_count; | |
126 | 125 |
127 // utility functions | 126 // utility functions |
128 void check_and_reset_count() { | 127 void check_and_reset_count() { |
129 if (!_count_pending_reset) return; | 128 if (!_count_pending_reset) return; |
130 _contended_enter_count = 0; | 129 _contended_enter_count = 0; |
163 void contended_enter_end() { _contended_enter_timer.stop(); check_and_reset_timer(); } | 162 void contended_enter_end() { _contended_enter_timer.stop(); check_and_reset_timer(); } |
164 | 163 |
165 void reset_count_stat() { _count_pending_reset = true; } | 164 void reset_count_stat() { _count_pending_reset = true; } |
166 void reset_time_stat() { _timer_pending_reset = true; } | 165 void reset_time_stat() { _timer_pending_reset = true; } |
167 | 166 |
168 int* class_init_recursion_count_addr() { return &_class_init_recursion_count; } | 167 int* perf_recursion_counts_addr() { return _perf_recursion_counts; } |
169 int* class_verify_recursion_count_addr() { return &_class_verify_recursion_count; } | 168 elapsedTimer* perf_timers_addr() { return _perf_timers; } |
170 int* class_link_recursion_count_addr() { return &_class_link_recursion_count; } | |
171 }; | 169 }; |
172 | 170 |
173 // Thread snapshot to represent the thread state and statistics | 171 // Thread snapshot to represent the thread state and statistics |
174 class ThreadSnapshot : public CHeapObj { | 172 class ThreadSnapshot : public CHeapObj { |
175 private: | 173 private: |