comparison src/share/vm/interpreter/invocationCounter.hpp @ 14420:abe03600372a

8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling Summary: Implement profiling for c2 jit compilation. Also enable new cppInterpreter features. Reviewed-by: kvn
author goetz
date Sun, 15 Sep 2013 15:28:58 +0200
parents bd7a7ce2e264
children d8041d695d19
comparison
equal deleted inserted replaced
14419:7373e44fa207 14420:abe03600372a
97 97
98 int get_InvocationLimit() const { return InterpreterInvocationLimit >> number_of_noncount_bits; } 98 int get_InvocationLimit() const { return InterpreterInvocationLimit >> number_of_noncount_bits; }
99 int get_BackwardBranchLimit() const { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; } 99 int get_BackwardBranchLimit() const { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; }
100 int get_ProfileLimit() const { return InterpreterProfileLimit >> number_of_noncount_bits; } 100 int get_ProfileLimit() const { return InterpreterProfileLimit >> number_of_noncount_bits; }
101 101
102 #ifdef CC_INTERP
102 // Test counter using scaled limits like the asm interpreter would do rather than doing 103 // Test counter using scaled limits like the asm interpreter would do rather than doing
103 // the shifts to normalize the counter. 104 // the shifts to normalize the counter.
104 105 // Checks sum of invocation_counter and backedge_counter as the template interpreter does.
105 bool reached_InvocationLimit() const { return _counter >= (unsigned int) InterpreterInvocationLimit; } 106 bool reached_InvocationLimit(InvocationCounter *back_edge_count) const {
106 bool reached_BackwardBranchLimit() const { return _counter >= (unsigned int) InterpreterBackwardBranchLimit; } 107 return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
107 108 (unsigned int) InterpreterInvocationLimit;
108 // Do this just like asm interpreter does for max speed
109 bool reached_ProfileLimit(InvocationCounter *back_edge_count) const {
110 return (_counter && count_mask) + back_edge_count->_counter >= (unsigned int) InterpreterProfileLimit;
111 } 109 }
110 bool reached_BackwardBranchLimit(InvocationCounter *back_edge_count) const {
111 return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
112 (unsigned int) InterpreterBackwardBranchLimit;
113 }
114 // Do this just like asm interpreter does for max speed.
115 bool reached_ProfileLimit(InvocationCounter *back_edge_count) const {
116 return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
117 (unsigned int) InterpreterProfileLimit;
118 }
119 #endif // CC_INTERP
112 120
113 void increment() { _counter += count_increment; } 121 void increment() { _counter += count_increment; }
114 122
115 123
116 // Printing 124 // Printing