< prev index next >

src/hotspot/share/gc/parallel/psPromotionManager.cpp

Print this page
@@ -312,11 +312,11 @@
  
  void PSPromotionManager::process_array_chunk(PartialArrayScanTask task) {
    assert(PSChunkLargeArrays, "invariant");
  
    oop old = task.to_source_array();
-   assert(old->is_objArray(), "invariant");
+   assert(UseCompactObjectHeaders || old->is_objArray(), "invariant");
    assert(old->is_forwarded(), "invariant");
  
    TASKQUEUE_STATS_ONLY(++_array_chunks_processed);
  
    oop const obj = old->forwardee();

@@ -350,11 +350,11 @@
    // Attempt to CAS in the header.
    // This tests if the header is still the same as when
    // this started.  If it is the same (i.e., no forwarding
    // pointer has been installed), then this thread owns
    // it.
-   if (obj->cas_forward_to(obj, obj_mark)) {
+   if (obj->forward_to_self_atomic(obj_mark) == NULL) {
      // We won any races, we "own" this object.
      assert(obj == obj->forwardee(), "Sanity");
  
      _promotion_failed_info.register_copy_failure(obj->size());
  
< prev index next >