< prev index next >
src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp
Print this page
@@ -57,10 +57,13 @@
#endif
#if INCLUDE_G1GC
#include "gc/g1/g1HeapRegionTraceType.hpp"
#include "gc/g1/g1YCTypes.hpp"
#endif
+#if INCLUDE_ZGC
+#include "gc/z/zStat.hpp"
+#endif
// implementation for the static registration function exposed in the api
bool JfrSerializer::register_serializer(JfrTypeId id, bool require_safepoint, bool permit_cache, JfrSerializer* cs) {
assert(cs != NULL, "invariant");
return JfrCheckpointManager::register_serializer(id, require_safepoint, permit_cache, cs);
@@ -344,5 +347,29 @@
writer.write(thread_name);
writer.write(java_lang_thread_id);
writer.write(thread_group_id);
JfrThreadGroup::serialize(&writer, thread_group_id);
}
+
+void ZStatCounterTypeConstant::serialize(JfrCheckpointWriter& writer) {
+#if INCLUDE_ZGC
+ writer.write_count(ZStatCounter::count());
+ for (ZStatCounter* counter = ZStatCounter::first(); counter != NULL; counter = counter->next()) {
+ writer.write_key(counter->id());
+ writer.write(counter->name());
+ }
+#else
+ writer.write_count(0);
+#endif
+}
+
+void ZStatSamplerTypeConstant::serialize(JfrCheckpointWriter& writer) {
+#if INCLUDE_ZGC
+ writer.write_count(ZStatSampler::count());
+ for (ZStatSampler* sampler = ZStatSampler::first(); sampler != NULL; sampler = sampler->next()) {
+ writer.write_key(sampler->id());
+ writer.write(sampler->name());
+ }
+#else
+ writer.write_count(0);
+#endif
+}
< prev index next >