RFR: 8331691: Generational ZGC: Use ZLocker uniformly [v2]
Stefan Karlsson
stefank at openjdk.org
Mon May 6 08:11:53 UTC 2024
On Sun, 5 May 2024 20:11:18 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Hi all,
>>
>> This patch removes the classes `ZDriverLocker` and `ZDriverUnlocker`, and uses `ZLocker` and newly added `ZUnlocker` instead. Thanks for taking the time to review.
>>
>> Testing:
>> - [x] linux-x64-slowdebug test-hotspot_gc
>>
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix ZUnlocker
I think the old code was nicer to read in those places where the lock were used.
If you still want to extract out the ZUnlocker part, maybe you code write a version that retained the `ZDriverLocker/ZDriverUnlocker` classes by implementing something like this:
ZDriverLocker : public ZLocker {
public:
// Note: lock() is a new accessor and not the old lock function
ZDriverLocker : ZLocker(ZDriver::lock()) {}
...
};
...
ZDriverUnlocker : public ZUnlocker {...};
-------------
Changes requested by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19092#pullrequestreview-2040221520
More information about the hotspot-gc-dev
mailing list