mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8373625: CPUTimeCounters creates a total counter for unsupported GCs
Reviewed-by: sjohanss, tschatzl
This commit is contained in:
parent
2241218ef6
commit
30be94086a
@ -28,6 +28,7 @@
|
||||
#define SHARE_RUNTIME_CPUTIMECOUNTERS_HPP
|
||||
|
||||
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
@ -83,7 +84,9 @@ public:
|
||||
assert(_instance == nullptr, "we can only allocate one CPUTimeCounters object");
|
||||
if (UsePerfData && os::is_thread_cpu_time_supported()) {
|
||||
_instance = new CPUTimeCounters();
|
||||
create_counter(SUN_THREADS, CPUTimeGroups::CPUTimeType::gc_total);
|
||||
if (UseG1GC || UseParallelGC) {
|
||||
create_counter(SUN_THREADS, CPUTimeGroups::CPUTimeType::gc_total);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user