RFR: 8330051: Small ObjectMonitor spinning code cleanups [v6]

Coleen Phillimore coleenp at openjdk.org
Fri Apr 19 12:34:11 UTC 2024


> Please review this patch that refactors some functions in the adaptive spinning code and moves the Knobs to where they're used and can be modified for experiments in the following code.  Also changed 'goto's to a 'break'.  I didn't change the names of TrySpin or TryLock, since all the names in this file are this style.
> 
> The only non-cosmetic change is for the pre-spin.  If the TryLock returns that a CAS failed, then the pre-spin ends, which shouldn't make a difference wrt to performance because the pre-spin is only for 10 iterations, but somehow my numbers are a little bit better for both Dacapo pmd and xalan.
> 
> Tested with tier1-7.

Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:

  Fix one-line breaks on lines I changed.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18730/files
  - new: https://git.openjdk.org/jdk/pull/18730/files/c3fa46bd..15fbf5fb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18730&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18730&range=04-05

  Stats: 18 lines in 1 file changed: 12 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/18730.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18730/head:pull/18730

PR: https://git.openjdk.org/jdk/pull/18730


More information about the hotspot-runtime-dev mailing list