[master] RFR: 8304341: [Lilliput] Use fixed-size lock-stack [v2]

Roman Kennke rkennke at openjdk.org
Fri Mar 17 08:31:09 UTC 2023


> 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.
> 
> This is already integrated in the related upstream PR: https://github.com/openjdk/jdk/pull/10907
> 
> Testing:
>  - [x] tier1
>  - [ ] tier2

Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:

  Set condition flags correctly after fast-lock call on aarch64

-------------

Changes:
  - all: https://git.openjdk.org/lilliput/pull/81/files
  - new: https://git.openjdk.org/lilliput/pull/81/files/3e0392b9..7824614a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=lilliput&pr=81&range=01
 - incr: https://webrevs.openjdk.org/?repo=lilliput&pr=81&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/lilliput/pull/81.diff
  Fetch: git fetch https://git.openjdk.org/lilliput pull/81/head:pull/81

PR: https://git.openjdk.org/lilliput/pull/81


More information about the lilliput-dev mailing list