260 return false;
261 }
262
263 void CompiledMethod::verify_oop_relocations() {
264 // Ensure sure that the code matches the current oop values
265 RelocIterator iter(this, NULL, NULL);
266 while (iter.next()) {
267 if (iter.type() == relocInfo::oop_type) {
268 oop_Relocation* reloc = iter.oop_reloc();
269 if (!reloc->oop_is_immediate()) {
270 reloc->verify_oop_relocation();
271 }
272 }
273 }
274 }
275
276
277 ScopeDesc* CompiledMethod::scope_desc_at(address pc) {
278 PcDesc* pd = pc_desc_at(pc);
279 guarantee(pd != NULL, "scope must be present");
280 return new ScopeDesc(this, pd->scope_decode_offset(),
281 pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(),
282 pd->return_oop());
283 }
284
285 ScopeDesc* CompiledMethod::scope_desc_near(address pc) {
286 PcDesc* pd = pc_desc_near(pc);
287 guarantee(pd != NULL, "scope must be present");
288 return new ScopeDesc(this, pd->scope_decode_offset(),
289 pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(),
290 pd->return_oop());
291 }
292
293 address CompiledMethod::oops_reloc_begin() const {
294 // If the method is not entrant or zombie then a JMP is plastered over the
295 // first few bytes. If an oop in the old code was there, that oop
296 // should not get GC'd. Skip the first few bytes of oops on
297 // not-entrant methods.
298 if (frame_complete_offset() != CodeOffsets::frame_never_safe &&
299 code_begin() + frame_complete_offset() >
300 verified_entry_point() + NativeJump::instruction_size)
301 {
302 // If we have a frame_complete_offset after the native jump, then there
303 // is no point trying to look for oops before that. This is a requirement
304 // for being allowed to scan oops concurrently.
305 return code_begin() + frame_complete_offset();
306 }
307
308 // It is not safe to read oops concurrently using entry barriers, if their
309 // location depend on whether the nmethod is entrant or not.
310 assert(BarrierSet::barrier_set()->barrier_set_nmethod() == NULL, "Not safe oop scan");
|
260 return false;
261 }
262
263 void CompiledMethod::verify_oop_relocations() {
264 // Ensure sure that the code matches the current oop values
265 RelocIterator iter(this, NULL, NULL);
266 while (iter.next()) {
267 if (iter.type() == relocInfo::oop_type) {
268 oop_Relocation* reloc = iter.oop_reloc();
269 if (!reloc->oop_is_immediate()) {
270 reloc->verify_oop_relocation();
271 }
272 }
273 }
274 }
275
276
277 ScopeDesc* CompiledMethod::scope_desc_at(address pc) {
278 PcDesc* pd = pc_desc_at(pc);
279 guarantee(pd != NULL, "scope must be present");
280 return new ScopeDesc(this, pd);
281 }
282
283 ScopeDesc* CompiledMethod::scope_desc_near(address pc) {
284 PcDesc* pd = pc_desc_near(pc);
285 guarantee(pd != NULL, "scope must be present");
286 return new ScopeDesc(this, pd);
287 }
288
289 address CompiledMethod::oops_reloc_begin() const {
290 // If the method is not entrant or zombie then a JMP is plastered over the
291 // first few bytes. If an oop in the old code was there, that oop
292 // should not get GC'd. Skip the first few bytes of oops on
293 // not-entrant methods.
294 if (frame_complete_offset() != CodeOffsets::frame_never_safe &&
295 code_begin() + frame_complete_offset() >
296 verified_entry_point() + NativeJump::instruction_size)
297 {
298 // If we have a frame_complete_offset after the native jump, then there
299 // is no point trying to look for oops before that. This is a requirement
300 // for being allowed to scan oops concurrently.
301 return code_begin() + frame_complete_offset();
302 }
303
304 // It is not safe to read oops concurrently using entry barriers, if their
305 // location depend on whether the nmethod is entrant or not.
306 assert(BarrierSet::barrier_set()->barrier_set_nmethod() == NULL, "Not safe oop scan");
|