comparison src/share/vm/interpreter/invocationCounter.hpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 4ca6dc0799b6
children
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
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