--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp Thu Apr 25 05:54:54 2019 -0700
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp Thu Apr 25 10:56:31 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,8 +110,8 @@
}
if (_thread->is_Java_thread()) {
// in order to allow the system to move to a safepoint
- MutexLockerEx msg_lock(JfrMsg_lock);
- JfrMsg_lock->wait(false, rotation_retry_sleep_millis);
+ MutexLocker msg_lock(JfrMsg_lock);
+ JfrMsg_lock->wait(rotation_retry_sleep_millis);
}
else {
os::naked_short_sleep(rotation_retry_sleep_millis);
@@ -341,7 +341,7 @@
assert(!_chunkwriter.is_valid(), "invariant");
assert(!JfrStream_lock->owned_by_self(), "invariant");
JfrChunkRotation::on_rotation();
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
if (!_repository.open_chunk(vm_error)) {
assert(!_chunkwriter.is_valid(), "invariant");
_storage.control().set_to_disk(false);
@@ -363,7 +363,7 @@
void JfrRecorderService::serialize_storage_from_in_memory_recording() {
assert(!JfrStream_lock->owned_by_self(), "not holding stream lock!");
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
_storage.write();
}
@@ -422,7 +422,7 @@
// release stream lock
//
void JfrRecorderService::pre_safepoint_write() {
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
assert(_chunkwriter.is_valid(), "invariant");
_checkpoint_manager.write_types();
_checkpoint_manager.write_epoch_transition_mspace();
@@ -457,7 +457,7 @@
//
void JfrRecorderService::safepoint_write() {
assert(SafepointSynchronize::is_at_safepoint(), "invariant");
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
write_object_sample_stacktrace(_stack_trace_repository);
write_stacktrace_checkpoint(_stack_trace_repository, _chunkwriter, true);
write_stringpool_checkpoint_safepoint(_string_pool, _chunkwriter);
@@ -493,7 +493,7 @@
// already tagged artifacts for the previous epoch. We can accomplish this concurrently
// with threads now tagging artifacts in relation to the new, now updated, epoch and remain outside of a safepoint.
_checkpoint_manager.write_type_set();
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
// serialize any outstanding checkpoint memory
_checkpoint_manager.write();
// serialize the metadata descriptor event and close out the chunk
@@ -526,7 +526,7 @@
void JfrRecorderService::process_full_buffers() {
if (_chunkwriter.is_valid()) {
assert(!JfrStream_lock->owned_by_self(), "invariant");
- MutexLockerEx stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
+ MutexLocker stream_lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
_storage.write_full();
}
}