< prev index next >

src/hotspot/share/oops/oop.cpp

Print this page
*** 152,11 ***
  bool oopDesc::is_objArray_noinline()    const { return is_objArray();    }
  bool oopDesc::is_typeArray_noinline()   const { return is_typeArray();   }
  
  bool oopDesc::has_klass_gap() {
    // Only has a klass gap when compressed class pointers are used.
!   return UseCompressedClassPointers;
  }
  
  #if INCLUDE_CDS_JAVA_HEAP
  void oopDesc::set_narrow_klass(narrowKlass nk) {
    assert(CDSConfig::is_dumping_heap(), "Used by CDS only. Do not abuse!");
--- 152,12 ---
  bool oopDesc::is_objArray_noinline()    const { return is_objArray();    }
  bool oopDesc::is_typeArray_noinline()   const { return is_typeArray();   }
  
  bool oopDesc::has_klass_gap() {
    // Only has a klass gap when compressed class pointers are used.
!   // Except when using compact headers.
+   return UseCompressedClassPointers && !UseCompactObjectHeaders;
  }
  
  #if INCLUDE_CDS_JAVA_HEAP
  void oopDesc::set_narrow_klass(narrowKlass nk) {
    assert(CDSConfig::is_dumping_heap(), "Used by CDS only. Do not abuse!");

*** 218,14 ***
  
  jdouble oopDesc::double_field_acquire(int offset) const               { return Atomic::load_acquire(field_addr<jdouble>(offset)); }
  void oopDesc::release_double_field_put(int offset, jdouble value)     { Atomic::release_store(field_addr<jdouble>(offset), value); }
  
  #ifdef ASSERT
! bool oopDesc::size_might_change() {
    // UseParallelGC and UseG1GC can change the length field
    // of an "old copy" of an object array in the young gen so it indicates
    // the grey portion of an already copied array. This will cause the first
    // disjunct below to fail if the two comparands are computed across such
    // a concurrent change.
!   return Universe::heap()->is_gc_active() && is_objArray() && is_forwarded() && (UseParallelGC || UseG1GC);
  }
  #endif
--- 219,14 ---
  
  jdouble oopDesc::double_field_acquire(int offset) const               { return Atomic::load_acquire(field_addr<jdouble>(offset)); }
  void oopDesc::release_double_field_put(int offset, jdouble value)     { Atomic::release_store(field_addr<jdouble>(offset), value); }
  
  #ifdef ASSERT
! bool oopDesc::size_might_change(Klass* klass) {
    // UseParallelGC and UseG1GC can change the length field
    // of an "old copy" of an object array in the young gen so it indicates
    // the grey portion of an already copied array. This will cause the first
    // disjunct below to fail if the two comparands are computed across such
    // a concurrent change.
!   return Universe::heap()->is_gc_active() && klass->is_objArray_klass() && is_forwarded() && (UseParallelGC || UseG1GC);
  }
  #endif
< prev index next >