--- a/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp Sun Sep 15 15:31:04 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/service/jfrPostBox.cpp Sun Sep 15 20:23:40 2019 +0200
@@ -26,7 +26,6 @@
#include "jfr/recorder/service/jfrPostBox.hpp"
#include "jfr/utilities/jfrTryLock.hpp"
#include "runtime/atomic.hpp"
-#include "runtime/orderAccess.hpp"
#include "runtime/thread.inline.hpp"
#define MSG_IS_SYNCHRONOUS ( (MSGBIT(MSG_ROTATE)) | \
@@ -86,7 +85,7 @@
void JfrPostBox::deposit(int new_messages) {
while (true) {
- const int current_msgs = OrderAccess::load_acquire(&_messages);
+ const int current_msgs = Atomic::load(&_messages);
// OR the new message
const int exchange_value = current_msgs | new_messages;
const int result = Atomic::cmpxchg(exchange_value, &_messages, current_msgs);
@@ -116,7 +115,7 @@
deposit(msg);
// serial_id is used to check when what we send in has been processed.
// _msg_read_serial is read under JfrMsg_lock protection.
- const uintptr_t serial_id = OrderAccess::load_acquire(&_msg_read_serial) + 1;
+ const uintptr_t serial_id = Atomic::load(&_msg_read_serial) + 1;
msg_lock.notify_all();
while (!is_message_processed(serial_id)) {
msg_lock.wait();
@@ -131,12 +130,12 @@
*/
bool JfrPostBox::is_message_processed(uintptr_t serial_id) const {
assert(JfrMsg_lock->owned_by_self(), "_msg_handled_serial must be read under JfrMsg_lock protection");
- return serial_id <= OrderAccess::load_acquire(&_msg_handled_serial);
+ return serial_id <= Atomic::load(&_msg_handled_serial);
}
bool JfrPostBox::is_empty() const {
assert(JfrMsg_lock->owned_by_self(), "not holding JfrMsg_lock!");
- return OrderAccess::load_acquire(&_messages) == 0;
+ return Atomic::load(&_messages) == 0;
}
int JfrPostBox::collect() {