296
297 void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
298 OopClosure* oop_fn, void derived_oop_fn(oop*, oop*),
299 OopClosure* value_fn) {
300 CodeBlob* cb = fr->cb();
301 assert(cb != NULL, "no codeblob");
302
303 NOT_PRODUCT(if (TraceCodeBlobStacks) trace_codeblob_maps(fr, reg_map);)
304
305 const ImmutableOopMapSet* maps = cb->oop_maps();
306 const ImmutableOopMap* map = cb->oop_map_for_return_address(fr->pc());
307 assert(map != NULL, "no ptr map found");
308
309 // handle derived pointers first (otherwise base pointer may be
310 // changed before derived pointer offset has been collected)
311 OopMapValue omv;
312 {
313 OopMapStream oms(map);
314 if (!oms.is_done()) {
315 #ifndef TIERED
316 COMPILER1_PRESENT(ShouldNotReachHere();)
317 #if INCLUDE_JVMCI
318 if (UseJVMCICompiler) {
319 ShouldNotReachHere();
320 }
321 #endif
322 #endif // !TIERED
323 do {
324 omv = oms.current();
325 if (omv.type() == OopMapValue::derived_oop_value) {
326 oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
327 guarantee(loc != NULL, "missing saved register");
328 oop *derived_loc = loc;
329 oop *base_loc = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
330 // Ignore NULL oops and decoded NULL narrow oops which
331 // equal to CompressedOops::base() when a narrow oop
332 // implicit null check is used in compiled code.
333 // The narrow_oop_base could be NULL or be the address
334 // of the page below heap depending on compressed oops mode.
335 if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) {
336 derived_oop_fn(base_loc, derived_loc);
337 }
338 }
339 oms.next();
|
296
297 void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map,
298 OopClosure* oop_fn, void derived_oop_fn(oop*, oop*),
299 OopClosure* value_fn) {
300 CodeBlob* cb = fr->cb();
301 assert(cb != NULL, "no codeblob");
302
303 NOT_PRODUCT(if (TraceCodeBlobStacks) trace_codeblob_maps(fr, reg_map);)
304
305 const ImmutableOopMapSet* maps = cb->oop_maps();
306 const ImmutableOopMap* map = cb->oop_map_for_return_address(fr->pc());
307 assert(map != NULL, "no ptr map found");
308
309 // handle derived pointers first (otherwise base pointer may be
310 // changed before derived pointer offset has been collected)
311 OopMapValue omv;
312 {
313 OopMapStream oms(map);
314 if (!oms.is_done()) {
315 #ifndef TIERED
316 omv = oms.current();
317 bool is_derived_oop = omv.type() == OopMapValue::derived_oop_value;
318 COMPILER1_PRESENT(if (is_derived_oop) ShouldNotReachHere();)
319 #if INCLUDE_JVMCI
320 if (UseJVMCICompiler) {
321 if (is_derived_oop) ShouldNotReachHere();
322 }
323 #endif
324 #endif // !TIERED
325 do {
326 omv = oms.current();
327 if (omv.type() == OopMapValue::derived_oop_value) {
328 oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
329 guarantee(loc != NULL, "missing saved register");
330 oop *derived_loc = loc;
331 oop *base_loc = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
332 // Ignore NULL oops and decoded NULL narrow oops which
333 // equal to CompressedOops::base() when a narrow oop
334 // implicit null check is used in compiled code.
335 // The narrow_oop_base could be NULL or be the address
336 // of the page below heap depending on compressed oops mode.
337 if (base_loc != NULL && *base_loc != NULL && !CompressedOops::is_base(*base_loc)) {
338 derived_oop_fn(base_loc, derived_loc);
339 }
340 }
341 oms.next();
|