--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Wed Sep 04 09:47:51 2019 +0200
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Wed Sep 04 09:47:55 2019 +0200
@@ -32,7 +32,6 @@
#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"
@@ -65,6 +64,9 @@
#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
@@ -323,18 +325,8 @@
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