We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cb7c08 commit 4d13812Copy full SHA for 4d13812
src/hotspot/share/runtime/cpuTimeCounters.hpp
@@ -28,6 +28,7 @@
28
#define SHARE_RUNTIME_CPUTIMECOUNTERS_HPP
29
30
31
+#include "gc/shared/gc_globals.hpp"
32
#include "memory/iterator.hpp"
33
#include "runtime/os.hpp"
34
#include "runtime/perfData.hpp"
@@ -83,7 +84,9 @@ class CPUTimeCounters: public CHeapObj<mtServiceability> {
83
84
assert(_instance == nullptr, "we can only allocate one CPUTimeCounters object");
85
if (UsePerfData && os::is_thread_cpu_time_supported()) {
86
_instance = new CPUTimeCounters();
- create_counter(SUN_THREADS, CPUTimeGroups::CPUTimeType::gc_total);
87
+ if (UseG1GC || UseParallelGC) {
88
+ create_counter(SUN_THREADS, CPUTimeGroups::CPUTimeType::gc_total);
89
+ }
90
}
91
92
0 commit comments