< prev index next >

src/hotspot/share/compiler/oopMap.cpp

Print this page

        

@@ -29,10 +29,11 @@
 #include "code/scopeDesc.hpp"
 #include "compiler/oopMap.hpp"
 #include "gc/shared/collectedHeap.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
+#include "oops/valueKlass.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/signature.hpp"
 #include "utilities/align.hpp"
 #ifdef COMPILER1
 #include "c1/c1_Defs.hpp"

@@ -366,10 +367,11 @@
     }
   }
 
   // We want coop and oop oop_types
   int mask = OopMapValue::oop_value | OopMapValue::narrowoop_value;
+  BufferedValuesDealiaser* dealiaser = NULL;
   {
     for (OopMapStream oms(map,mask); !oms.is_done(); oms.next()) {
       omv = oms.current();
       oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
       // It should be an error if no location can be found for a

@@ -387,23 +389,33 @@
           // of the page below heap depending on compressed oops mode.
           continue;
         }
 #ifdef ASSERT
         if ((((uintptr_t)loc & (sizeof(*loc)-1)) != 0) ||
-            !Universe::heap()->is_in_or_null(*loc)) {
+            (!Universe::heap()->is_in_or_null(*loc)
+                && !VTBuffer::is_in_vt_buffer(*loc))) {
           tty->print_cr("# Found non oop pointer.  Dumping state at failure");
           // try to dump out some helpful debugging information
           trace_codeblob_maps(fr, reg_map);
           omv.print();
           tty->print_cr("register r");
           omv.reg()->print();
           tty->print_cr("loc = %p *loc = %p\n", loc, (address)*loc);
           // do the real assert.
-          assert(Universe::heap()->is_in_or_null(*loc), "found non oop pointer");
+          assert(Universe::heap()->is_in_or_null(*loc) || VTBuffer::is_in_vt_buffer(*loc),
+                 "found non oop pointer");
         }
 #endif // ASSERT
+        if (!VTBuffer::is_in_vt_buffer(*loc)) {
         oop_fn->do_oop(loc);
+        } else {
+          assert((*loc)->is_value(), "Sanity check");
+          if (dealiaser == NULL) {
+            dealiaser = Thread::current()->buffered_values_dealiaser();
+          }
+          dealiaser->oops_do(oop_fn, *loc);
+        }
       } else if ( omv.type() == OopMapValue::narrowoop_value ) {
         narrowOop *nl = (narrowOop*)loc;
 #ifndef VM_LITTLE_ENDIAN
         VMReg vmReg = omv.reg();
         // Don't do this on SPARC float registers as they can be individually addressed
< prev index next >