--- a/hotspot/src/share/vm/oops/method.hpp Thu Feb 13 17:57:27 2014 +0100
+++ b/hotspot/src/share/vm/oops/method.hpp Wed Feb 19 12:08:49 2014 -0800
@@ -348,16 +348,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