< prev index next >

src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp

Print this page

        

*** 25,35 **** #ifndef SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP #define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP #include "jfr/utilities/jfrTypes.hpp" #include "memory/allocation.hpp" ! #include "runtime/orderAccess.hpp" #define USED_BIT 1 #define METHOD_USED_BIT (USED_BIT << 2) #define EPOCH_1_SHIFT 0 #define EPOCH_2_SHIFT 1 --- 25,35 ---- #ifndef SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP #define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP #include "jfr/utilities/jfrTypes.hpp" #include "memory/allocation.hpp" ! #include "runtime/atomic.hpp" #define USED_BIT 1 #define METHOD_USED_BIT (USED_BIT << 2) #define EPOCH_1_SHIFT 0 #define EPOCH_2_SHIFT 1
*** 89,108 **** static traceid method_and_class_in_use_prev_epoch_bits() { return _epoch_state ? METHOD_AND_CLASS_IN_USE_EPOCH_1_BITS : METHOD_AND_CLASS_IN_USE_EPOCH_2_BITS; } static bool has_changed_tag_state() { ! if (OrderAccess::load_acquire(&_tag_state)) { ! OrderAccess::release_store(&_tag_state, false); return true; } return false; } static void set_changed_tag_state() { ! if (!OrderAccess::load_acquire(&_tag_state)) { ! OrderAccess::release_store(&_tag_state, true); } } }; #endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP --- 89,108 ---- static traceid method_and_class_in_use_prev_epoch_bits() { return _epoch_state ? METHOD_AND_CLASS_IN_USE_EPOCH_1_BITS : METHOD_AND_CLASS_IN_USE_EPOCH_2_BITS; } static bool has_changed_tag_state() { ! if (Atomic::load_acquire(&_tag_state)) { ! Atomic::release_store(&_tag_state, false); return true; } return false; } static void set_changed_tag_state() { ! if (!Atomic::load_acquire(&_tag_state)) { ! Atomic::release_store(&_tag_state, true); } } }; #endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEIDEPOCH_HPP
< prev index next >