8217857: ZGC: Move SvcGCMarker to ZServiceabilityTracer
authorpliden
Tue, 29 Jan 2019 10:23:38 +0100
changeset 53540 9f75dc382445
parent 53539 4ffdb0093c89
child 53541 4e325f8b50ce
8217857: ZGC: Move SvcGCMarker to ZServiceabilityTracer Reviewed-by: stefank, eosterlund
src/hotspot/share/gc/z/zDriver.cpp
src/hotspot/share/gc/z/zServiceability.hpp
--- a/src/hotspot/share/gc/z/zDriver.cpp	Tue Jan 29 10:23:38 2019 +0100
+++ b/src/hotspot/share/gc/z/zDriver.cpp	Tue Jan 29 10:23:38 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -24,7 +24,6 @@
 #include "precompiled.hpp"
 #include "gc/shared/gcId.hpp"
 #include "gc/shared/gcLocker.hpp"
-#include "gc/shared/gcVMOperations.hpp"
 #include "gc/shared/isGCActiveMark.hpp"
 #include "gc/z/zCollectedHeap.hpp"
 #include "gc/z/zDriver.hpp"
@@ -99,9 +98,6 @@
 
     ZStatSample(ZSamplerJavaThreads, Threads::number_of_threads());
 
-    // JVMTI support
-    SvcGCMarker sgcm(SvcGCMarker::CONCURRENT);
-
     // Setup GC id
     GCIdMark gcid(_gc_id);
 
--- a/src/hotspot/share/gc/z/zServiceability.hpp	Tue Jan 29 10:23:38 2019 +0100
+++ b/src/hotspot/share/gc/z/zServiceability.hpp	Tue Jan 29 10:23:38 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -25,6 +25,7 @@
 #define SHARE_GC_Z_ZSERVICEABILITY_HPP
 
 #include "gc/shared/collectorCounters.hpp"
+#include "gc/shared/gcVMOperations.hpp"
 #include "memory/allocation.hpp"
 #include "services/memoryManager.hpp"
 #include "services/memoryPool.hpp"
@@ -88,12 +89,14 @@
 template <bool IsGCStart, bool IsGCEnd>
 class ZServiceabilityTracer : public StackObj {
 private:
+  SvcGCMarker                       _svc_gc_marker;
   ZServiceabilityMemoryUsageTracker _memory_usage_tracker;
   ZServiceabilityManagerStatsTracer _manager_stats_tracer;
   ZServiceabilityCountersTracer     _counters_tracer;
 
 public:
   ZServiceabilityTracer() :
+      _svc_gc_marker(SvcGCMarker::CONCURRENT),
       _memory_usage_tracker(),
       _manager_stats_tracer(IsGCStart, IsGCEnd),
       _counters_tracer() {}