changeset 47784:494e1490b341

8173917: Safepoint ID is not consistent across event-based tracing events Reviewed-by: egahlin, mgronlun Contributed-by: robin.westberg@oracle.com
author egahlin
date Mon, 16 Oct 2017 16:44:23 +0200
parents ba91aaeec3a9
children a91c094bcaa4 0c2e1f8eccaa
files src/hotspot/share/runtime/safepoint.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/safepoint.cpp	Mon Oct 16 17:03:56 2017 +0200
+++ b/src/hotspot/share/runtime/safepoint.cpp	Mon Oct 16 16:44:23 2017 +0200
@@ -333,7 +333,8 @@
     }
 
     if (sync_event.should_commit()) {
-      sync_event.set_safepointId(safepoint_counter());
+      // Group this event together with the ones committed after the counter is increased
+      sync_event.set_safepointId(safepoint_counter() + 1);
       sync_event.set_initialThreadCount(initial_running);
       sync_event.set_runningThreadCount(_waiting_to_block);
       sync_event.set_iterations(iterations);