Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8209802

Garbage collectors should register JFR types themselves to avoid build errors.

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 12
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      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) {

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated: