Integrated: 8286957: Held monitor count

Robbin Ehn rehn at openjdk.org
Fri Jul 8 07:15:02 UTC 2022


On Mon, 30 May 2022 11:04:11 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

> The current implementation do not count all monitor enter, counts high up in abstraction and causes a performance regression on aarch64 with some benchmarks due to C2 changes.
> 
> This change makes the counting exact by pushing the counting down in the abstraction.
> The additional JNI counter is strictly not needed, but enables us to figure out if we have monitors "on stack".
> 
> An uncontended lock plus unlock is 1 ns (21.5 -> 22.5) slower in C2 compiled code on x64 with the additional increment and decrement.
> 
> Fixed aarch64, x64, x86 and zero.
> 
> Passes t1-8

This pull request has now been integrated.

Changeset: ac399e97
Author:    Robbin Ehn <rehn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ac399e9777731e7a9cbc2ad3396acfa5358b1c76
Stats:     562 lines in 44 files changed: 324 ins; 155 del; 83 mod

8286957: Held monitor count

Reviewed-by: rpressler, eosterlund

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

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


More information about the hotspot-dev mailing list