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

[Lilliput] Use fixed-size lock-stack

XMLWordPrintable

    • generic
    • generic

      Until now, we used to have a variable-sized lock-stack: when pushing an object to it and capacity is exceeded, it would re-allocate a new stack and use that. However, experiments show that the lock-stack very rarely exceeds 5 slots (I have not yet found a workload that does actually exceed it). It makes sense to make the lock-stack a fixed-size array: it makes addressing the lock-stack simpler and more efficient and it increases the likelyhood of the lock-stack being in CPU cache. If the lock-stack is ever exceeded, we would not do stack-locking at all, but instead inflate the monitor and use that.

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: