75 // | result_index (C++ interpreter only) | |
75 // | result_index (C++ interpreter only) | |
76 // |------------------------------------------------------| |
76 // |------------------------------------------------------| |
77 // | method_size | max_stack | |
77 // | method_size | max_stack | |
78 // | max_locals | size_of_parameters | |
78 // | max_locals | size_of_parameters | |
79 // |------------------------------------------------------| |
79 // |------------------------------------------------------| |
80 // | intrinsic_id, (unused) | throwout_count | |
80 // |intrinsic_id| flags | throwout_count | |
81 // |------------------------------------------------------| |
81 // |------------------------------------------------------| |
82 // | num_breakpoints | (unused) | |
82 // | num_breakpoints | (unused) | |
83 // |------------------------------------------------------| |
83 // |------------------------------------------------------| |
84 // | invocation_counter | |
84 // | invocation_counter | |
85 // | backedge_counter | |
85 // | backedge_counter | |
122 u2 _method_size; // size of this object |
122 u2 _method_size; // size of this object |
123 u2 _max_stack; // Maximum number of entries on the expression stack |
123 u2 _max_stack; // Maximum number of entries on the expression stack |
124 u2 _max_locals; // Number of local variables used by this method |
124 u2 _max_locals; // Number of local variables used by this method |
125 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words |
125 u2 _size_of_parameters; // size of the parameter block (receiver + arguments) in words |
126 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) |
126 u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) |
|
127 u1 _jfr_towrite : 1, // Flags |
|
128 : 7; |
127 u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting |
129 u2 _interpreter_throwout_count; // Count of times method was exited via exception while interpreting |
128 u2 _number_of_breakpoints; // fullspeed debugging support |
130 u2 _number_of_breakpoints; // fullspeed debugging support |
129 InvocationCounter _invocation_counter; // Incremented before each activation of the method - used to trigger frequency-based optimizations |
131 InvocationCounter _invocation_counter; // Incremented before each activation of the method - used to trigger frequency-based optimizations |
130 InvocationCounter _backedge_counter; // Incremented before each backedge taken - used to trigger frequencey-based optimizations |
132 InvocationCounter _backedge_counter; // Incremented before each backedge taken - used to trigger frequencey-based optimizations |
131 |
133 |
223 void decr_number_of_breakpoints() { --_number_of_breakpoints; } |
225 void decr_number_of_breakpoints() { --_number_of_breakpoints; } |
224 // Initialization only |
226 // Initialization only |
225 void clear_number_of_breakpoints() { _number_of_breakpoints = 0; } |
227 void clear_number_of_breakpoints() { _number_of_breakpoints = 0; } |
226 |
228 |
227 // index into instanceKlass methods() array |
229 // index into instanceKlass methods() array |
|
230 // note: also used by jfr |
228 u2 method_idnum() const { return constMethod()->method_idnum(); } |
231 u2 method_idnum() const { return constMethod()->method_idnum(); } |
229 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } |
232 void set_method_idnum(u2 idnum) { constMethod()->set_method_idnum(idnum); } |
230 |
233 |
231 // code size |
234 // code size |
232 int code_size() const { return constMethod()->code_size(); } |
235 int code_size() const { return constMethod()->code_size(); } |
648 |
651 |
649 // Helper routines for intrinsic_id() and vmIntrinsics::method(). |
652 // Helper routines for intrinsic_id() and vmIntrinsics::method(). |
650 void init_intrinsic_id(); // updates from _none if a match |
653 void init_intrinsic_id(); // updates from _none if a match |
651 static vmSymbols::SID klass_id_for_intrinsics(klassOop holder); |
654 static vmSymbols::SID klass_id_for_intrinsics(klassOop holder); |
652 |
655 |
|
656 bool jfr_towrite() { return _jfr_towrite; } |
|
657 void set_jfr_towrite(bool towrite) { _jfr_towrite = towrite; } |
|
658 |
653 // On-stack replacement support |
659 // On-stack replacement support |
654 bool has_osr_nmethod(int level, bool match_level) { |
660 bool has_osr_nmethod(int level, bool match_level) { |
655 return instanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; |
661 return instanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; |
656 } |
662 } |
657 |
663 |