RFR: 8284811: Shrink critical section of JNICritical_lock [v2]
David Holmes
dholmes at openjdk.java.net
Wed Apr 13 21:43:15 UTC 2022
On Wed, 13 Apr 2022 08:42:57 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> This refactoring around gc-locker consists of two commits:
>>
>> 1. Remove `_debug_jni_lock_count` because `verify_critical_count` already verifies #threads in critical regions. `_debug_jni_lock_count` doesn't introduce anything new.
>>
>> 2. Shrink the critical section associated with `JNICritical_lock` to accesses to `_needs_gc` and nothing else.
>>
>> Test: tier1-6
>
> Albert Mingkun Yang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>
> finer cr
I think I agree that _debug_jni_lock_count is not really adding anything ... but perhaps there is a subtlety we are overlooking. Digging into the history of the code may shed more light.
The rest of the changes are very hard to follow and seem to completely change the logic.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8218
More information about the hotspot-gc-dev
mailing list