Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8343381 Unified Compiler Logging
  3. JDK-8343387

Clean up compiler logging flags (avoid disjunctions, etc.)

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • hotspot

      Many compiler logging flags are ad-hoc and present a few issues due to their nature. One of them is overlapping of information, where two flags are used to print similar information. This non-disjoint flags present a series of issues when attempting to migrate them to the UnifiedLogging framework.

      Consider the case:

      if (PrintOpto || PrintInlining) {
        tty->print("ilk");
      }

      Migrating that to UnifiedLogging would mean considering the case where each of them is active and also both:

      if (ul_enabled(PrintOpto) || ul_enabled(PrintInlining) || ul_enabled(PrintOpto, PrintInlining)) {
        ...
      }

      This adds unnecessary verbosity to the code. Additionally, when emitting logging we may need to tag logs accordingly, i.e.

      * PrintOpto is the only one enabled, so we want to log(PrintOpto)("ilk")
      * PrintInlining is the only one enabled, so log(PrintInlining)("ilk")
      * Both are enabled, and therefore log(PrintOpto, PrintInlining)("ilk")

      Additionally, if -Xlog:PrintOpto,PrintInlining has been specified, the message has to be "solomonically" tagged with either of those tags, as tagging it with both will not log it as per JDK-8343384

            Unassigned Unassigned
            dlunden Daniel Lunden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: