< prev index next >

src/hotspot/share/compiler/oopMap.cpp

Print this page




 362   {
 363     for (OopMapStream oms(map,mask); !oms.is_done(); oms.next()) {
 364       omv = oms.current();
 365       oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
 366       // It should be an error if no location can be found for a
 367       // register mentioned as contained an oop of some kind.  Maybe
 368       // this was allowed previously because value_value items might
 369       // be missing?
 370       guarantee(loc != NULL, "missing saved register");
 371       if ( omv.type() == OopMapValue::oop_value ) {
 372         oop val = *loc;
 373         if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
 374           // Ignore NULL oops and decoded NULL narrow oops which
 375           // equal to Universe::narrow_oop_base when a narrow oop
 376           // implicit null check is used in compiled code.
 377           // The narrow_oop_base could be NULL or be the address
 378           // of the page below heap depending on compressed oops mode.
 379           continue;
 380         }
 381 #ifdef ASSERT
 382         if (!UseLoadBarrier &&
 383             ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
 384              !Universe::heap()->is_in_or_null(*loc))) {
 385           tty->print_cr("# Found non oop pointer.  Dumping state at failure");
 386           // try to dump out some helpful debugging information
 387           trace_codeblob_maps(fr, reg_map);
 388           omv.print();
 389           tty->print_cr("register r");
 390           omv.reg()->print();
 391           tty->print_cr("loc = %p *loc = %p\n", loc, (address)*loc);
 392           // do the real assert.
 393           assert(Universe::heap()->is_in_or_null(*loc), "found non oop pointer");
 394         }
 395 #endif // ASSERT
 396         oop_fn->do_oop(loc);
 397       } else if ( omv.type() == OopMapValue::narrowoop_value ) {
 398         narrowOop *nl = (narrowOop*)loc;
 399 #ifndef VM_LITTLE_ENDIAN
 400         VMReg vmReg = omv.reg();
 401         // Don't do this on SPARC float registers as they can be individually addressed
 402         if (!vmReg->is_stack() SPARC_ONLY(&& !vmReg->is_FloatRegister())) {




 362   {
 363     for (OopMapStream oms(map,mask); !oms.is_done(); oms.next()) {
 364       omv = oms.current();
 365       oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
 366       // It should be an error if no location can be found for a
 367       // register mentioned as contained an oop of some kind.  Maybe
 368       // this was allowed previously because value_value items might
 369       // be missing?
 370       guarantee(loc != NULL, "missing saved register");
 371       if ( omv.type() == OopMapValue::oop_value ) {
 372         oop val = *loc;
 373         if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
 374           // Ignore NULL oops and decoded NULL narrow oops which
 375           // equal to Universe::narrow_oop_base when a narrow oop
 376           // implicit null check is used in compiled code.
 377           // The narrow_oop_base could be NULL or be the address
 378           // of the page below heap depending on compressed oops mode.
 379           continue;
 380         }
 381 #ifdef ASSERT
 382         if (!UseZGC &&
 383             ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
 384              !Universe::heap()->is_in_or_null(*loc))) {
 385           tty->print_cr("# Found non oop pointer.  Dumping state at failure");
 386           // try to dump out some helpful debugging information
 387           trace_codeblob_maps(fr, reg_map);
 388           omv.print();
 389           tty->print_cr("register r");
 390           omv.reg()->print();
 391           tty->print_cr("loc = %p *loc = %p\n", loc, (address)*loc);
 392           // do the real assert.
 393           assert(Universe::heap()->is_in_or_null(*loc), "found non oop pointer");
 394         }
 395 #endif // ASSERT
 396         oop_fn->do_oop(loc);
 397       } else if ( omv.type() == OopMapValue::narrowoop_value ) {
 398         narrowOop *nl = (narrowOop*)loc;
 399 #ifndef VM_LITTLE_ENDIAN
 400         VMReg vmReg = omv.reg();
 401         // Don't do this on SPARC float registers as they can be individually addressed
 402         if (!vmReg->is_stack() SPARC_ONLY(&& !vmReg->is_FloatRegister())) {


< prev index next >