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

[Lilliput] Inline initial LockStack stack

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • 21
    • hotspot

      The initial stack of LockStack is malloced and lives on the heap. It just consists of one slot. It would be better to let this stack live inside the LockStack object.

      Gives us a much higher chance of cache hits when accessing lockstack slots via lockstack header. We eliminate (in the majority of cases) or at least postpone the first malloc call. And we use actually less memory (not that it matters much) per thread since malloc overhead is at least 48 bytes per allocation, probably more.

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

              Created:
              Updated:
              Resolved: