238 PcDesc* pc_desc_near(address pc) { return find_pc_desc(pc, true); }
239
240 // ScopeDesc for an instruction
241 ScopeDesc* scope_desc_at(address pc);
242 ScopeDesc* scope_desc_near(address pc);
243
244 bool is_at_poll_return(address pc);
245 bool is_at_poll_or_poll_return(address pc);
246
247 bool is_marked_for_deoptimization() const { return _mark_for_deoptimization_status != not_marked; }
248 void mark_for_deoptimization(bool inc_recompile_counts = true) {
249 _mark_for_deoptimization_status = (inc_recompile_counts ? deoptimize : deoptimize_noupdate);
250 }
251 bool update_recompile_counts() const {
252 // Update recompile counts when either the update is explicitly requested (deoptimize)
253 // or the nmethod is not marked for deoptimization at all (not_marked).
254 // The latter happens during uncommon traps when deoptimized nmethod is made not entrant.
255 return _mark_for_deoptimization_status != deoptimize_noupdate;
256 }
257
258 static bool nmethod_access_is_safe(nmethod* nm);
259
260 // tells whether frames described by this nmethod can be deoptimized
261 // note: native wrappers cannot be deoptimized.
262 bool can_be_deoptimized() const { return is_java_method(); }
263
264 virtual oop oop_at(int index) const = 0;
265 virtual Metadata* metadata_at(int index) const = 0;
266
267 address scopes_data_begin() const { return _scopes_data_begin; }
268 virtual address scopes_data_end() const = 0;
269 int scopes_data_size() const { return scopes_data_end() - scopes_data_begin(); }
270
271 virtual PcDesc* scopes_pcs_begin() const = 0;
272 virtual PcDesc* scopes_pcs_end() const = 0;
273 int scopes_pcs_size() const { return (intptr_t) scopes_pcs_end() - (intptr_t) scopes_pcs_begin(); }
274
275 address insts_begin() const { return code_begin(); }
276 address insts_end() const { return stub_begin(); }
277 // Returns true if a given address is in the 'insts' section. The method
278 // insts_contains_inclusive() is end-inclusive.
279 bool insts_contains(address addr) const { return insts_begin() <= addr && addr < insts_end(); }
|
238 PcDesc* pc_desc_near(address pc) { return find_pc_desc(pc, true); }
239
240 // ScopeDesc for an instruction
241 ScopeDesc* scope_desc_at(address pc);
242 ScopeDesc* scope_desc_near(address pc);
243
244 bool is_at_poll_return(address pc);
245 bool is_at_poll_or_poll_return(address pc);
246
247 bool is_marked_for_deoptimization() const { return _mark_for_deoptimization_status != not_marked; }
248 void mark_for_deoptimization(bool inc_recompile_counts = true) {
249 _mark_for_deoptimization_status = (inc_recompile_counts ? deoptimize : deoptimize_noupdate);
250 }
251 bool update_recompile_counts() const {
252 // Update recompile counts when either the update is explicitly requested (deoptimize)
253 // or the nmethod is not marked for deoptimization at all (not_marked).
254 // The latter happens during uncommon traps when deoptimized nmethod is made not entrant.
255 return _mark_for_deoptimization_status != deoptimize_noupdate;
256 }
257
258 // tells whether frames described by this nmethod can be deoptimized
259 // note: native wrappers cannot be deoptimized.
260 bool can_be_deoptimized() const { return is_java_method(); }
261
262 virtual oop oop_at(int index) const = 0;
263 virtual Metadata* metadata_at(int index) const = 0;
264
265 address scopes_data_begin() const { return _scopes_data_begin; }
266 virtual address scopes_data_end() const = 0;
267 int scopes_data_size() const { return scopes_data_end() - scopes_data_begin(); }
268
269 virtual PcDesc* scopes_pcs_begin() const = 0;
270 virtual PcDesc* scopes_pcs_end() const = 0;
271 int scopes_pcs_size() const { return (intptr_t) scopes_pcs_end() - (intptr_t) scopes_pcs_begin(); }
272
273 address insts_begin() const { return code_begin(); }
274 address insts_end() const { return stub_begin(); }
275 // Returns true if a given address is in the 'insts' section. The method
276 // insts_contains_inclusive() is end-inclusive.
277 bool insts_contains(address addr) const { return insts_begin() <= addr && addr < insts_end(); }
|