mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling
Implement profiling for c2 jit compilation. Also enable new cppInterpreter features. Reviewed-by: kvn
This commit is contained in:
parent
34c8023949
commit
0732a739b3
11 changed files with 790 additions and 103 deletions
|
@ -99,16 +99,24 @@ class InvocationCounter VALUE_OBJ_CLASS_SPEC {
|
|||
int get_BackwardBranchLimit() const { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; }
|
||||
int get_ProfileLimit() const { return InterpreterProfileLimit >> number_of_noncount_bits; }
|
||||
|
||||
#ifdef CC_INTERP
|
||||
// Test counter using scaled limits like the asm interpreter would do rather than doing
|
||||
// the shifts to normalize the counter.
|
||||
|
||||
bool reached_InvocationLimit() const { return _counter >= (unsigned int) InterpreterInvocationLimit; }
|
||||
bool reached_BackwardBranchLimit() const { return _counter >= (unsigned int) InterpreterBackwardBranchLimit; }
|
||||
|
||||
// Do this just like asm interpreter does for max speed
|
||||
bool reached_ProfileLimit(InvocationCounter *back_edge_count) const {
|
||||
return (_counter && count_mask) + back_edge_count->_counter >= (unsigned int) InterpreterProfileLimit;
|
||||
// Checks sum of invocation_counter and backedge_counter as the template interpreter does.
|
||||
bool reached_InvocationLimit(InvocationCounter *back_edge_count) const {
|
||||
return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
|
||||
(unsigned int) InterpreterInvocationLimit;
|
||||
}
|
||||
bool reached_BackwardBranchLimit(InvocationCounter *back_edge_count) const {
|
||||
return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
|
||||
(unsigned int) InterpreterBackwardBranchLimit;
|
||||
}
|
||||
// Do this just like asm interpreter does for max speed.
|
||||
bool reached_ProfileLimit(InvocationCounter *back_edge_count) const {
|
||||
return (_counter & count_mask) + (back_edge_count->_counter & count_mask) >=
|
||||
(unsigned int) InterpreterProfileLimit;
|
||||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
void increment() { _counter += count_increment; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue