1.1 --- a/src/share/vm/oops/method.hpp Thu Dec 05 15:13:12 2013 -0800 1.2 +++ b/src/share/vm/oops/method.hpp Mon Dec 02 10:26:14 2013 +0100 1.3 @@ -350,16 +350,21 @@ 1.4 } 1.5 1.6 void set_method_data(MethodData* data) { 1.7 - _method_data = data; 1.8 + // The store into method must be released. On platforms without 1.9 + // total store order (TSO) the reference may become visible before 1.10 + // the initialization of data otherwise. 1.11 + OrderAccess::release_store_ptr((volatile void *)&_method_data, data); 1.12 } 1.13 1.14 MethodCounters* method_counters() const { 1.15 return _method_counters; 1.16 } 1.17 1.18 - 1.19 void set_method_counters(MethodCounters* counters) { 1.20 - _method_counters = counters; 1.21 + // The store into method must be released. On platforms without 1.22 + // total store order (TSO) the reference may become visible before 1.23 + // the initialization of data otherwise. 1.24 + OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters); 1.25 } 1.26 1.27 #ifdef TIERED