< 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 == NULL || CompressedOops::is_base(val)) {
 374           // Ignore NULL oops and decoded NULL narrow oops which
 375           // equal to CompressedOops::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 ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
 383             !Universe::heap()->is_in_or_null(*loc)) {




 384           tty->print_cr("# Found non oop pointer.  Dumping state at failure");
 385           // try to dump out some helpful debugging information
 386           trace_codeblob_maps(fr, reg_map);
 387           omv.print();
 388           tty->print_cr("register r");
 389           omv.reg()->print();
 390           tty->print_cr("loc = %p *loc = %p\n", loc, (address)*loc);
 391           // do the real assert.
 392           assert(Universe::heap()->is_in_or_null(*loc), "found non oop pointer");
 393         }
 394 #endif // ASSERT
 395         oop_fn->do_oop(loc);
 396       } else if ( omv.type() == OopMapValue::narrowoop_value ) {
 397         narrowOop *nl = (narrowOop*)loc;
 398 #ifndef VM_LITTLE_ENDIAN
 399         VMReg vmReg = omv.reg();
 400         // Don't do this on SPARC float registers as they can be individually addressed
 401         if (!vmReg->is_stack() SPARC_ONLY(&& !vmReg->is_FloatRegister())) {
 402           // compressed oops in registers only take up 4 bytes of an
 403           // 8 byte register but they are in the wrong part of the




 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 == NULL || CompressedOops::is_base(val)) {
 374           // Ignore NULL oops and decoded NULL narrow oops which
 375           // equal to CompressedOops::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         // We can not verify the oop here if we are using ZGC, the oop
 383         // will be bad in case we had a safepoint between a load and a
 384         // load barrier.
 385         if (!UseZGC &&
 386             ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
 387              !Universe::heap()->is_in_or_null(*loc))) {
 388           tty->print_cr("# Found non oop pointer.  Dumping state at failure");
 389           // try to dump out some helpful debugging information
 390           trace_codeblob_maps(fr, reg_map);
 391           omv.print();
 392           tty->print_cr("register r");
 393           omv.reg()->print();
 394           tty->print_cr("loc = %p *loc = %p\n", loc, (address)*loc);
 395           // do the real assert.
 396           assert(Universe::heap()->is_in_or_null(*loc), "found non oop pointer");
 397         }
 398 #endif // ASSERT
 399         oop_fn->do_oop(loc);
 400       } else if ( omv.type() == OopMapValue::narrowoop_value ) {
 401         narrowOop *nl = (narrowOop*)loc;
 402 #ifndef VM_LITTLE_ENDIAN
 403         VMReg vmReg = omv.reg();
 404         // Don't do this on SPARC float registers as they can be individually addressed
 405         if (!vmReg->is_stack() SPARC_ONLY(&& !vmReg->is_FloatRegister())) {
 406           // compressed oops in registers only take up 4 bytes of an
 407           // 8 byte register but they are in the wrong part of the


< prev index next >