Mercurial > hg > graal-compiler
comparison src/share/vm/interpreter/invocationCounter.hpp @ 14489:f460c6926af7
Merge
author | ehelin |
---|---|
date | Tue, 25 Feb 2014 11:02:11 +0100 |
parents | abe03600372a |
children | d8041d695d19 |
comparison
equal
deleted
inserted
replaced
14488:60fd6d24f49f | 14489:f460c6926af7 |
---|---|
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 |