src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp

changeset 7535
7ae4e26cb1e0
parent 7031
ee019285a52c
parent 6876
710a3c8b516e
child 8019
3fb3ceb7398f
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp	Mon Mar 16 11:49:32 2015 -0700
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp	Thu Oct 12 21:27:07 2017 +0800
     1.3 @@ -75,11 +75,19 @@
     1.4  
     1.5    oop new_obj = NULL;
     1.6  
     1.7 +#ifdef MIPS64
     1.8 +  if (Use3A2000) OrderAccess::fence();
     1.9 +#endif
    1.10 +
    1.11    // NOTE! We must be very careful with any methods that access the mark
    1.12    // in o. There may be multiple threads racing on it, and it may be forwarded
    1.13    // at any time. Do not use oop methods for accessing the mark!
    1.14    markOop test_mark = o->mark();
    1.15  
    1.16 +#ifdef MIPS64
    1.17 +  if (Use3A2000) OrderAccess::fence();
    1.18 +#endif
    1.19 +
    1.20    // The same test as "o->is_forwarded()"
    1.21    if (!test_mark->is_marked()) {
    1.22      bool new_obj_is_tenured = false;
    1.23 @@ -112,6 +120,10 @@
    1.24              }
    1.25            }
    1.26          }
    1.27 +
    1.28 +#ifdef MIPS64
    1.29 +        if (Use3A2000) OrderAccess::fence();
    1.30 +#endif
    1.31        }
    1.32      }
    1.33  
    1.34 @@ -169,6 +181,9 @@
    1.35  
    1.36      // Copy obj
    1.37      Copy::aligned_disjoint_words((HeapWord*)o, (HeapWord*)new_obj, new_obj_size);
    1.38 +#ifdef MIPS64
    1.39 +    if (Use3A2000) OrderAccess::fence();
    1.40 +#endif
    1.41  
    1.42      // Now we have to CAS in the header.
    1.43      if (o->cas_forward_to(new_obj, test_mark)) {
    1.44 @@ -216,6 +231,10 @@
    1.45        // don't update this before the unallocation!
    1.46        new_obj = o->forwardee();
    1.47      }
    1.48 +
    1.49 +#ifdef MIPS64
    1.50 +    if (Use3A2000) OrderAccess::fence();
    1.51 +#endif
    1.52    } else {
    1.53      assert(o->is_forwarded(), "Sanity");
    1.54      new_obj = o->forwardee();

mercurial