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

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

    XMLWordPrintable

Details

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

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

              Dates

                Created:
                Updated:
                Resolved: