54 friend class ciReplay;
55
56 private:
57 // General method information.
58 ciFlags _flags;
59 ciSymbol* _name;
60 ciInstanceKlass* _holder;
61 ciSignature* _signature;
62 ciMethodData* _method_data;
63 ciMethodBlocks* _method_blocks;
64
65 // Code attributes.
66 int _code_size;
67 int _max_stack;
68 int _max_locals;
69 vmIntrinsics::ID _intrinsic_id;
70 int _handler_count;
71 int _interpreter_invocation_count;
72 int _interpreter_throwout_count;
73 int _instructions_size;
74
75 bool _uses_monitors;
76 bool _balanced_monitors;
77 bool _is_c1_compilable;
78 bool _is_c2_compilable;
79 bool _can_be_statically_bound;
80
81 // Lazy fields, filled in on demand
82 address _code;
83 ciExceptionHandler** _exception_handlers;
84
85 // Optional liveness analyzer.
86 MethodLiveness* _liveness;
87 #if defined(COMPILER2) || defined(SHARK)
88 ciTypeFlow* _flow;
89 BCEscapeAnalyzer* _bcea;
90 #endif
91
92 ciMethod(methodHandle h_m);
93 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
149 // Add a receiver argument, maybe:
150 if (code != Bytecodes::_invokestatic &&
151 code != Bytecodes::_invokedynamic) {
152 arg_size++;
153 }
154 return arg_size;
155 }
156 }
157
158
159 // Method code and related information.
160 address code() { if (_code == NULL) load_code(); return _code; }
161 int code_size() const { check_is_loaded(); return _code_size; }
162 int max_stack() const { check_is_loaded(); return _max_stack; }
163 int max_locals() const { check_is_loaded(); return _max_locals; }
164 vmIntrinsics::ID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
165 bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
166 int exception_table_length() const { check_is_loaded(); return _handler_count; }
167 int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
168 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; }
169
170 // Code size for inlining decisions.
171 int code_size_for_inlining();
172
173 bool caller_sensitive() { return get_Method()->caller_sensitive(); }
174 bool force_inline() { return get_Method()->force_inline(); }
175 bool dont_inline() { return get_Method()->dont_inline(); }
176
177 int comp_level();
178 int highest_osr_comp_level();
179
180 Bytecodes::Code java_code_at_bci(int bci) {
181 address bcp = code() + bci;
182 return Bytecodes::java_code_at(NULL, bcp);
183 }
184 Bytecodes::Code raw_code_at_bci(int bci) {
185 address bcp = code() + bci;
186 return Bytecodes::code_at(NULL, bcp);
187 }
188 BCEscapeAnalyzer *get_bcea();
224 // during OSR when loading the locals.
225
226 BitMap live_local_oops_at_bci(int bci);
227
228 #ifdef COMPILER1
229 const BitMap bci_block_start();
230 #endif
231
232 ciTypeFlow* get_flow_analysis();
233 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
234 ciCallProfile call_profile_at_bci(int bci);
235 int interpreter_call_site_count(int bci);
236
237 // Does type profiling provide a useful type at this point?
238 ciKlass* argument_profiled_type(int bci, int i);
239 ciKlass* parameter_profiled_type(int i);
240 ciKlass* return_profiled_type(int bci);
241
242 ciField* get_field_at_bci( int bci, bool &will_link);
243 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
244
245 // Given a certain calling environment, find the monomorphic target
246 // for the call. Return NULL if the call is not monomorphic in
247 // its calling environment.
248 ciMethod* find_monomorphic_target(ciInstanceKlass* caller,
249 ciInstanceKlass* callee_holder,
250 ciInstanceKlass* actual_receiver);
251
252 // Given a known receiver klass, find the target for the call.
253 // Return NULL if the call has no target or is abstract.
254 ciMethod* resolve_invoke(ciKlass* caller, ciKlass* exact_receiver);
255
256 // Find the proper vtable index to invoke this method.
257 int resolve_vtable_index(ciKlass* caller, ciKlass* receiver);
258
259 // Compilation directives
260 bool should_exclude();
261 bool should_inline();
262 bool should_not_inline();
263 bool should_print_assembly();
264 bool break_at_execute();
|
54 friend class ciReplay;
55
56 private:
57 // General method information.
58 ciFlags _flags;
59 ciSymbol* _name;
60 ciInstanceKlass* _holder;
61 ciSignature* _signature;
62 ciMethodData* _method_data;
63 ciMethodBlocks* _method_blocks;
64
65 // Code attributes.
66 int _code_size;
67 int _max_stack;
68 int _max_locals;
69 vmIntrinsics::ID _intrinsic_id;
70 int _handler_count;
71 int _interpreter_invocation_count;
72 int _interpreter_throwout_count;
73 int _instructions_size;
74 int _size_of_parameters;
75
76 bool _uses_monitors;
77 bool _balanced_monitors;
78 bool _is_c1_compilable;
79 bool _is_c2_compilable;
80 bool _can_be_statically_bound;
81
82 // Lazy fields, filled in on demand
83 address _code;
84 ciExceptionHandler** _exception_handlers;
85
86 // Optional liveness analyzer.
87 MethodLiveness* _liveness;
88 #if defined(COMPILER2) || defined(SHARK)
89 ciTypeFlow* _flow;
90 BCEscapeAnalyzer* _bcea;
91 #endif
92
93 ciMethod(methodHandle h_m);
94 ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
150 // Add a receiver argument, maybe:
151 if (code != Bytecodes::_invokestatic &&
152 code != Bytecodes::_invokedynamic) {
153 arg_size++;
154 }
155 return arg_size;
156 }
157 }
158
159
160 // Method code and related information.
161 address code() { if (_code == NULL) load_code(); return _code; }
162 int code_size() const { check_is_loaded(); return _code_size; }
163 int max_stack() const { check_is_loaded(); return _max_stack; }
164 int max_locals() const { check_is_loaded(); return _max_locals; }
165 vmIntrinsics::ID intrinsic_id() const { check_is_loaded(); return _intrinsic_id; }
166 bool has_exception_handlers() const { check_is_loaded(); return _handler_count > 0; }
167 int exception_table_length() const { check_is_loaded(); return _handler_count; }
168 int interpreter_invocation_count() const { check_is_loaded(); return _interpreter_invocation_count; }
169 int interpreter_throwout_count() const { check_is_loaded(); return _interpreter_throwout_count; }
170 int size_of_parameters() const { check_is_loaded(); return _size_of_parameters; }
171
172 // Code size for inlining decisions.
173 int code_size_for_inlining();
174
175 bool caller_sensitive() { return get_Method()->caller_sensitive(); }
176 bool force_inline() { return get_Method()->force_inline(); }
177 bool dont_inline() { return get_Method()->dont_inline(); }
178
179 int comp_level();
180 int highest_osr_comp_level();
181
182 Bytecodes::Code java_code_at_bci(int bci) {
183 address bcp = code() + bci;
184 return Bytecodes::java_code_at(NULL, bcp);
185 }
186 Bytecodes::Code raw_code_at_bci(int bci) {
187 address bcp = code() + bci;
188 return Bytecodes::code_at(NULL, bcp);
189 }
190 BCEscapeAnalyzer *get_bcea();
226 // during OSR when loading the locals.
227
228 BitMap live_local_oops_at_bci(int bci);
229
230 #ifdef COMPILER1
231 const BitMap bci_block_start();
232 #endif
233
234 ciTypeFlow* get_flow_analysis();
235 ciTypeFlow* get_osr_flow_analysis(int osr_bci); // alternate entry point
236 ciCallProfile call_profile_at_bci(int bci);
237 int interpreter_call_site_count(int bci);
238
239 // Does type profiling provide a useful type at this point?
240 ciKlass* argument_profiled_type(int bci, int i);
241 ciKlass* parameter_profiled_type(int i);
242 ciKlass* return_profiled_type(int bci);
243
244 ciField* get_field_at_bci( int bci, bool &will_link);
245 ciMethod* get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature);
246 int get_stack_effect_at_invoke(int bci, Bytecodes::Code code, int& inputs);
247 int stack_effect_if_at_invoke(int bci);
248 // Given a certain calling environment, find the monomorphic target
249 // for the call. Return NULL if the call is not monomorphic in
250 // its calling environment.
251 ciMethod* find_monomorphic_target(ciInstanceKlass* caller,
252 ciInstanceKlass* callee_holder,
253 ciInstanceKlass* actual_receiver);
254
255 // Given a known receiver klass, find the target for the call.
256 // Return NULL if the call has no target or is abstract.
257 ciMethod* resolve_invoke(ciKlass* caller, ciKlass* exact_receiver);
258
259 // Find the proper vtable index to invoke this method.
260 int resolve_vtable_index(ciKlass* caller, ciKlass* receiver);
261
262 // Compilation directives
263 bool should_exclude();
264 bool should_inline();
265 bool should_not_inline();
266 bool should_print_assembly();
267 bool break_at_execute();
|