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

Ensure LogTag types are sorted

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      share/logging/logTag.cpp executes code during static initialization to set up a sorted array used by LogTag::list_tags to print all tags in a sorted manner (used by -Xlog:logging, for example). We can instead ensure the LogTag type enum is sorted beforehand, and rewrite the sorting logic to an assert checking this invariant.

      This removes ~58 000 instructions from being executed on startup, and saves a few bytes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: