--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.cpp Sat Oct 26 23:59:51 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.cpp Mon Oct 28 18:43:04 2019 +0100
@@ -25,17 +25,13 @@
#include "precompiled.hpp"
#include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp"
#include "runtime/safepoint.hpp"
-#include "runtime/orderAccess.hpp"
// Alternating epochs on each rotation allow for concurrent tagging.
-// The regular epoch shift happens only during a safepoint.
-// The fence is there only for the emergency dump case which happens outside of safepoint.
+// The epoch shift happens only during a safepoint.
bool JfrTraceIdEpoch::_epoch_state = false;
bool volatile JfrTraceIdEpoch::_tag_state = false;
void JfrTraceIdEpoch::shift_epoch() {
+ assert(SafepointSynchronize::is_at_safepoint(), "invariant");
_epoch_state = !_epoch_state;
- if (!SafepointSynchronize::is_at_safepoint()) {
- OrderAccess::fence();
- }
}