-
Bug
-
Resolution: Fixed
-
P4
-
12
-
b13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8245817 | 13.0.4 | Stefan Johansson | P4 | Resolved | Fixed | b03 |
JDK-8236711 | 11.0.7 | Stefan Johansson | P4 | Resolved | Fixed | b01 |
When building with --with-jvm-features=-g1gc, I noticed several JFR files need to be fixed with adding #if INCLUDE_G1GC. The following is just a quick work around. Similar #if probably need to be added when other GC types are disabled.
diff -r 12997ebbc0d8 src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Mon Aug 20 13:58:23 2018 -0700
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Tue Aug 21 10:31:27 2018 -0700
@@ -312,7 +312,9 @@
class VM_G1SendHeapRegionInfoEvents : public VM_Operation {
virtual void doit() {
+#if INCLUDE_G1GC
G1HeapRegionEventSender::send_events();
+#endif
}
virtual VMOp_Type type() const { return VMOp_HeapIterateOperation; }
};
diff -r 12997ebbc0d8 src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp Mon Aug 20 13:58:23 2018 -0700
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp Tue Aug 21 10:31:27 2018 -0700
@@ -188,12 +188,14 @@
}
void G1HeapRegionTypeConstant::serialize(JfrCheckpointWriter& writer) {
+#if INCLUDE_G1GC
static const u4 nof_entries = G1HeapRegionTraceType::G1HeapRegionTypeEndSentinel;
writer.write_count(nof_entries);
for (u4 i = 0; i < nof_entries; ++i) {
writer.write_key(i);
writer.write(G1HeapRegionTraceType::to_string((G1HeapRegionTraceType::Type)i));
}
+#endif
}
void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) {
diff -r 12997ebbc0d8 src/hotspot/share/jfr/periodic/jfrPeriodic.cpp
--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Mon Aug 20 13:58:23 2018 -0700
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Tue Aug 21 10:31:27 2018 -0700
@@ -312,7 +312,9 @@
class VM_G1SendHeapRegionInfoEvents : public VM_Operation {
virtual void doit() {
+#if INCLUDE_G1GC
G1HeapRegionEventSender::send_events();
+#endif
}
virtual VMOp_Type type() const { return VMOp_HeapIterateOperation; }
};
diff -r 12997ebbc0d8 src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp Mon Aug 20 13:58:23 2018 -0700
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp Tue Aug 21 10:31:27 2018 -0700
@@ -188,12 +188,14 @@
}
void G1HeapRegionTypeConstant::serialize(JfrCheckpointWriter& writer) {
+#if INCLUDE_G1GC
static const u4 nof_entries = G1HeapRegionTraceType::G1HeapRegionTypeEndSentinel;
writer.write_count(nof_entries);
for (u4 i = 0; i < nof_entries; ++i) {
writer.write_key(i);
writer.write(G1HeapRegionTraceType::to_string((G1HeapRegionTraceType::Type)i));
}
+#endif
}
void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) {
- backported by
-
JDK-8236711 Garbage collectors should register JFR types themselves to avoid build errors.
-
- Resolved
-
-
JDK-8245817 Garbage collectors should register JFR types themselves to avoid build errors.
-
- Resolved
-
- duplicates
-
JDK-8213503 Build failure for SerialGC-only JDK
-
- Closed
-