< prev index next >

src/hotspot/share/compiler/oopMap.cpp

Print this page




 363   {
 364     for (OopMapStream oms(map,mask); !oms.is_done(); oms.next()) {
 365       omv = oms.current();
 366       oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
 367       // It should be an error if no location can be found for a
 368       // register mentioned as contained an oop of some kind.  Maybe
 369       // this was allowed previously because value_value items might
 370       // be missing?
 371       guarantee(loc != NULL, "missing saved register");
 372       if ( omv.type() == OopMapValue::oop_value ) {
 373         oop val = *loc;
 374         if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
 375           // Ignore NULL oops and decoded NULL narrow oops which
 376           // equal to Universe::narrow_oop_base when a narrow oop
 377           // implicit null check is used in compiled code.
 378           // The narrow_oop_base could be NULL or be the address
 379           // of the page below heap depending on compressed oops mode.
 380           continue;
 381         }
 382 #ifdef ASSERT
 383         if ((((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())) {
 403           // compressed oops in registers only take up 4 bytes of an
 404           // 8 byte register but they are in the wrong part of the




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


< prev index next >