JDK-8043061 : Tiered: MethodCounters should be present for methods enqueued for compilation
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2014-05-13
  • Updated: 2014-09-20
  • Resolved: 2014-09-20
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Vladimir Kozlov wrote:
>>> The update_rate() could be not called if there are no MethodCounters
>>> (other places may need to be fixed for that). Actually I don't
>>> understand how we have compilation request for a method without
>>> MethodCounters. Counters should be created before that.
>> It's not always the case. MDO can be created first (e.g. compilation can
>> force MDO creation [1]) and there's no need in MethodCounters (see
>> InterpreterGenerator::generate_counter_incr [2]).
> 
> I think this is contradiction in tiered implementation. We don't 
> allocate MethodCounters for TieredCompilation as you pointed but tiered 
> code uses them.

[1]
Method::build_interpreter_method_data(methodHandle, Thread*)
ciMethod::ensure_method_data(methodHandle)
ciMethod::ensure_method_data()
GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*)

[2] http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/file/tip/src/cpu/x86/vm/templateInterpreter_x86_32.cpp#l340