src/share/vm/interpreter/invocationCounter.hpp

Print this page
rev 5190 : 8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling
Summary: Implement profiling for c2 jit compilation. Also enable new cppInterpreter features.

*** 97,116 **** int get_InvocationLimit() const { return InterpreterInvocationLimit >> number_of_noncount_bits; } int get_BackwardBranchLimit() const { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; } int get_ProfileLimit() const { return InterpreterProfileLimit >> number_of_noncount_bits; } // 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; } void increment() { _counter += count_increment; } // Printing --- 97,124 ---- int get_InvocationLimit() const { return InterpreterInvocationLimit >> number_of_noncount_bits; } 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. ! // 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; } // Printing