< prev index next >
src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
Print this page
rev 56146 : 8209802: Garbage collectors should register JFR types themselves to avoid build errors.
@@ -30,11 +30,10 @@
#include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp"
#include "compiler/compileBroker.hpp"
-#include "gc/g1/g1HeapRegionEventSender.hpp"
#include "gc/shared/gcConfiguration.hpp"
#include "gc/shared/gcTrace.hpp"
#include "gc/shared/gcVMOperations.hpp"
#include "gc/shared/objectCountEventSender.hpp"
#include "jfr/jfrEvents.hpp"
@@ -63,10 +62,13 @@
#include "services/classLoadingService.hpp"
#include "services/management.hpp"
#include "services/threadService.hpp"
#include "utilities/exceptions.hpp"
#include "utilities/globalDefinitions.hpp"
+#if INCLUDE_G1GC
+#include "gc/g1/g1HeapRegionEventSender.hpp"
+#endif
#if INCLUDE_SHENANDOAHGC
#include "gc/shenandoah/shenandoahJfrSupport.hpp"
#endif
/**
* JfrPeriodic class
@@ -321,22 +323,12 @@
TRACE_REQUEST_FUNC(ObjectCount) {
VM_GC_SendObjectCountEvent op;
VMThread::execute(&op);
}
-class VM_G1SendHeapRegionInfoEvents : public VM_Operation {
- virtual void doit() {
- G1HeapRegionEventSender::send_events();
- }
- virtual VMOp_Type type() const { return VMOp_HeapIterateOperation; }
-};
-
TRACE_REQUEST_FUNC(G1HeapRegionInformation) {
- if (UseG1GC) {
- VM_G1SendHeapRegionInfoEvents op;
- VMThread::execute(&op);
- }
+ G1GC_ONLY(G1HeapRegionEventSender::send_events());
}
// Java Mission Control (JMC) uses (Java) Long.MIN_VALUE to describe that a
// long value is undefined.
static jlong jmc_undefined_long = min_jlong;
< prev index next >