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

Ensure LogTag types are sorted

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 16
    • hotspot
    • b17
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: