Ensure LogTag types are sorted

XMLWordPrintable

    • b17
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: