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

[UL] Make Decorations safely copy-able and reduce their size

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      In Universal Logging, class LogDecorations keeps resolved decorations as well as a lookup table of pointers to the start of each resolved decoration, by decorator. This is dangerous, since it makes object copy non-trivial (the pointers would need to be relocated). It is also wasteful since we spend 8 bytes per pointer per index.

      Better would be to use a numerical index array of offset values, which could be safely copied. And since the resolve buffer is 256 char, we can easily make this index an 8-bit value, which would reduce the size of a LogDecorations object from 368 down to 280 bytes (which matters e.g. for JDK-8229517)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: