Mercurial > hg > truffle
diff src/share/vm/oops/method.hpp @ 14443:3205e78d8193
8029396: PPC64 (part 212): Several memory ordering fixes in C-code.
Summary: memory ordering fixes in GC and other runtime code showing on PPC64.
Reviewed-by: kvn, coleenp
author | goetz |
---|---|
date | Mon, 02 Dec 2013 10:26:14 +0100 |
parents | f50418dfb1b7 |
children | 8a9bb7821e28 9428a0b94204 |
line wrap: on
line diff
--- a/src/share/vm/oops/method.hpp Thu Dec 05 15:13:12 2013 -0800 +++ b/src/share/vm/oops/method.hpp Mon Dec 02 10:26:14 2013 +0100 @@ -350,16 +350,21 @@ } void set_method_data(MethodData* data) { - _method_data = data; + // The store into method must be released. On platforms without + // total store order (TSO) the reference may become visible before + // the initialization of data otherwise. + OrderAccess::release_store_ptr((volatile void *)&_method_data, data); } MethodCounters* method_counters() const { return _method_counters; } - void set_method_counters(MethodCounters* counters) { - _method_counters = counters; + // The store into method must be released. On platforms without + // total store order (TSO) the reference may become visible before + // the initialization of data otherwise. + OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters); } #ifdef TIERED