--- a/hotspot/src/share/vm/runtime/vmThread.cpp Wed Mar 23 10:31:46 2016 +0100
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp Wed Mar 23 10:52:35 2016 +0100
@@ -32,6 +32,7 @@
#include "runtime/interfaceSupport.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
+#include "runtime/safepoint.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
@@ -352,14 +353,16 @@
op->evaluate();
if (event.should_commit()) {
- bool is_concurrent = op->evaluate_concurrently();
+ const bool is_concurrent = op->evaluate_concurrently();
+ const bool evaluate_at_safepoint = op->evaluate_at_safepoint();
event.set_operation(op->type());
- event.set_safepoint(op->evaluate_at_safepoint());
+ event.set_safepoint(evaluate_at_safepoint);
event.set_blocking(!is_concurrent);
// Only write caller thread information for non-concurrent vm operations.
// For concurrent vm operations, the thread id is set to 0 indicating thread is unknown.
// This is because the caller thread could have exited already.
event.set_caller(is_concurrent ? 0 : THREAD_TRACE_ID(op->calling_thread()));
+ event.set_safepointId(evaluate_at_safepoint ? SafepointSynchronize::safepoint_counter() : 0);
event.commit();
}