src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.cpp
branchJEP-349-branch
changeset 57983 a57907813a83
parent 57873 68134337dbf8
child 58112 e7754025004b
equal deleted inserted replaced
57971:aa7b1ea52413 57983:a57907813a83
    29 
    29 
    30 // Alternating epochs on each rotation allow for concurrent tagging.
    30 // Alternating epochs on each rotation allow for concurrent tagging.
    31 // The regular epoch shift happens only during a safepoint.
    31 // The regular epoch shift happens only during a safepoint.
    32 // The fence is there only for the emergency dump case which happens outside of safepoint.
    32 // The fence is there only for the emergency dump case which happens outside of safepoint.
    33 bool JfrTraceIdEpoch::_epoch_state = false;
    33 bool JfrTraceIdEpoch::_epoch_state = false;
    34 bool volatile JfrTraceIdEpoch::_klass_tagged_in_epoch = false;
    34 bool volatile JfrTraceIdEpoch::_tag_state = false;
    35 
    35 
    36 void JfrTraceIdEpoch::shift_epoch() {
    36 void JfrTraceIdEpoch::shift_epoch() {
    37   _epoch_state = !_epoch_state;
    37   _epoch_state = !_epoch_state;
    38   if (!SafepointSynchronize::is_at_safepoint()) {
    38   if (!SafepointSynchronize::is_at_safepoint()) {
    39     OrderAccess::fence();
    39     OrderAccess::fence();