Integrated: 8330051: Small ObjectMonitor spinning code cleanups

Coleen Phillimore coleenp at openjdk.org
Mon Apr 22 11:28:34 UTC 2024


On Wed, 10 Apr 2024 18:16:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: ee7b2e9b
Author:    Coleen Phillimore <coleenp at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ee7b2e9b3bd2b4607476ae03bb6c9f7e49a43d0e
Stats:     135 lines in 2 files changed: 60 ins; 31 del; 44 mod

8330051: Small ObjectMonitor spinning code cleanups

Reviewed-by: dcubed, eosterlund, fbredberg

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

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


More information about the hotspot-runtime-dev mailing list