--- a/src/hotspot/share/gc/z/zTracer.inline.hpp Mon Oct 21 09:55:48 2019 +0200
+++ b/src/hotspot/share/gc/z/zTracer.inline.hpp Mon Oct 21 09:55:58 2019 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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,12 +24,38 @@
#ifndef SHARE_GC_Z_ZTRACER_INLINE_HPP
#define SHARE_GC_Z_ZTRACER_INLINE_HPP
+#include "gc/z/zStat.hpp"
#include "gc/z/zTracer.hpp"
+#include "jfr/jfrEvents.hpp"
inline ZTracer* ZTracer::tracer() {
return _tracer;
}
+inline void ZTracer::report_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
+ if (EventZStatisticsCounter::is_enabled()) {
+ send_stat_counter(counter, increment, value);
+ }
+}
+
+inline void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
+ if (EventZStatisticsSampler::is_enabled()) {
+ send_stat_sampler(sampler, value);
+ }
+}
+
+inline void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
+ if (EventZThreadPhase::is_enabled()) {
+ send_thread_phase(name, start, end);
+ }
+}
+
+inline void ZTracer::report_page_alloc(size_t size, size_t used, size_t free, size_t cache, ZAllocationFlags flags) {
+ if (EventZPageAllocation::is_enabled()) {
+ send_page_alloc(size, used, free, cache, flags);
+ }
+}
+
inline ZTraceThreadPhase::ZTraceThreadPhase(const char* name) :
_start(Ticks::now()),
_name(name) {}