1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp Fri Jul 16 10:09:15 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.hpp Fri Jul 16 21:33:21 2010 -0700 1.3 @@ -42,8 +42,6 @@ 1.4 class PSOldGen; 1.5 class ParCompactionManager; 1.6 1.7 -#define PS_PM_STATS 0 1.8 - 1.9 class PSPromotionManager : public CHeapObj { 1.10 friend class PSScavenge; 1.11 friend class PSRefProcTaskExecutor; 1.12 @@ -54,22 +52,18 @@ 1.13 static PSOldGen* _old_gen; 1.14 static MutableSpace* _young_space; 1.15 1.16 -#if PS_PM_STATS 1.17 - uint _total_pushes; 1.18 - uint _masked_pushes; 1.19 +#if TASKQUEUE_STATS 1.20 + size_t _masked_pushes; 1.21 + size_t _masked_steals; 1.22 + size_t _arrays_chunked; 1.23 + size_t _array_chunks_processed; 1.24 1.25 - uint _overflow_pushes; 1.26 - uint _max_overflow_length; 1.27 + void print_taskqueue_stats(uint i) const; 1.28 + void print_local_stats(uint i) const; 1.29 + static void print_stats(); 1.30 1.31 - uint _arrays_chunked; 1.32 - uint _array_chunks_processed; 1.33 - 1.34 - uint _total_steals; 1.35 - uint _masked_steals; 1.36 - 1.37 - void print_stats(uint i); 1.38 - static void print_stats(); 1.39 -#endif // PS_PM_STATS 1.40 + void reset_stats(); 1.41 +#endif // TASKQUEUE_STATS 1.42 1.43 PSYoungPromotionLAB _young_lab; 1.44 PSOldPromotionLAB _old_lab; 1.45 @@ -143,42 +137,12 @@ 1.46 1.47 template <class T> void push_depth(T* p) { 1.48 assert(depth_first(), "pre-condition"); 1.49 - 1.50 -#if PS_PM_STATS 1.51 - ++_total_pushes; 1.52 - int stack_length = claimed_stack_depth()->overflow_stack()->length(); 1.53 -#endif // PS_PM_STATS 1.54 - 1.55 claimed_stack_depth()->push(p); 1.56 - 1.57 -#if PS_PM_STATS 1.58 - if (claimed_stack_depth()->overflow_stack()->length() != stack_length) { 1.59 - ++_overflow_pushes; 1.60 - if ((uint)stack_length + 1 > _max_overflow_length) { 1.61 - _max_overflow_length = (uint)stack_length + 1; 1.62 - } 1.63 - } 1.64 -#endif // PS_PM_STATS 1.65 } 1.66 1.67 void push_breadth(oop o) { 1.68 assert(!depth_first(), "pre-condition"); 1.69 - 1.70 -#if PS_PM_STATS 1.71 - ++_total_pushes; 1.72 - int stack_length = claimed_stack_breadth()->overflow_stack()->length(); 1.73 -#endif // PS_PM_STATS 1.74 - 1.75 claimed_stack_breadth()->push(o); 1.76 - 1.77 -#if PS_PM_STATS 1.78 - if (claimed_stack_breadth()->overflow_stack()->length() != stack_length) { 1.79 - ++_overflow_pushes; 1.80 - if ((uint)stack_length + 1 > _max_overflow_length) { 1.81 - _max_overflow_length = (uint)stack_length + 1; 1.82 - } 1.83 - } 1.84 -#endif // PS_PM_STATS 1.85 } 1.86 1.87 protected: 1.88 @@ -256,12 +220,5 @@ 1.89 template <class T> inline void claim_or_forward_depth(T* p); 1.90 template <class T> inline void claim_or_forward_breadth(T* p); 1.91 1.92 -#if PS_PM_STATS 1.93 - void increment_steals(oop* p = NULL) { 1.94 - _total_steals += 1; 1.95 - if (p != NULL && is_oop_masked(p)) { 1.96 - _masked_steals += 1; 1.97 - } 1.98 - } 1.99 -#endif // PS_PM_STATS 1.100 + TASKQUEUE_STATS_ONLY(inline void record_steal(StarTask& p);) 1.101 };