237 // pc_desc_near returns the first PcDesc at or after the given pc. 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 250 bool update_recompile_counts() const { 251 // Update recompile counts when either the update is explicitly requested (deoptimize) 252 // or the nmethod is not marked for deoptimization at all (not_marked). 253 // The latter happens during uncommon traps when deoptimized nmethod is made not entrant. 254 return _mark_for_deoptimization_status != deoptimize_noupdate; 255 } 256 257 static bool nmethod_access_is_safe(nmethod* nm); 258 259 // tells whether frames described by this nmethod can be deoptimized 260 // note: native wrappers cannot be deoptimized. 261 bool can_be_deoptimized() const { return is_java_method(); } 262 263 virtual oop oop_at(int index) const = 0; 264 virtual Metadata* metadata_at(int index) const = 0; 265 266 address scopes_data_begin() const { return _scopes_data_begin; } 267 virtual address scopes_data_end() const = 0; 268 int scopes_data_size() const { return scopes_data_end() - scopes_data_begin(); } 269 270 virtual PcDesc* scopes_pcs_begin() const = 0; 271 virtual PcDesc* scopes_pcs_end() const = 0; 272 int scopes_pcs_size() const { return (intptr_t) scopes_pcs_end() - (intptr_t) scopes_pcs_begin(); } 273 274 address insts_begin() const { return code_begin(); } 275 address insts_end() const { return stub_begin(); } 276 // Returns true if a given address is in the 'insts' section. The method 277 // insts_contains_inclusive() is end-inclusive. 278 bool insts_contains(address addr) const { return insts_begin() <= addr && addr < insts_end(); } | 237 // pc_desc_near returns the first PcDesc at or after the given pc. 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 250 bool update_recompile_counts() const { 251 // Update recompile counts when either the update is explicitly requested (deoptimize) 252 // or the nmethod is not marked for deoptimization at all (not_marked). 253 // The latter happens during uncommon traps when deoptimized nmethod is made not entrant. 254 return _mark_for_deoptimization_status != deoptimize_noupdate; 255 } 256 257 // tells whether frames described by this nmethod can be deoptimized 258 // note: native wrappers cannot be deoptimized. 259 bool can_be_deoptimized() const { return is_java_method(); } 260 261 virtual oop oop_at(int index) const = 0; 262 virtual Metadata* metadata_at(int index) const = 0; 263 264 address scopes_data_begin() const { return _scopes_data_begin; } 265 virtual address scopes_data_end() const = 0; 266 int scopes_data_size() const { return scopes_data_end() - scopes_data_begin(); } 267 268 virtual PcDesc* scopes_pcs_begin() const = 0; 269 virtual PcDesc* scopes_pcs_end() const = 0; 270 int scopes_pcs_size() const { return (intptr_t) scopes_pcs_end() - (intptr_t) scopes_pcs_begin(); } 271 272 address insts_begin() const { return code_begin(); } 273 address insts_end() const { return stub_begin(); } 274 // Returns true if a given address is in the 'insts' section. The method 275 // insts_contains_inclusive() is end-inclusive. 276 bool insts_contains(address addr) const { return insts_begin() <= addr && addr < insts_end(); } |