RFR: 8313332: Simplify lazy jmethodID cache in InstanceKlass [v2]
Coleen Phillimore
coleenp at openjdk.org
Wed Apr 3 23:05:24 UTC 2024
On Wed, 3 Apr 2024 13:25:36 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This change simplifies the code that grows the jmethodID cache in InstanceKlass. Instead of lazily, when there's a rare request for a jmethodID for an obsolete method, the jmethodID cache is grown during the RedefineClasses safepoint. The InstanceKlass's jmethodID cache is lazily allocated when there's a jmethodID allocated, so not every InstanceKlass has a cache, but the growth now only happens in a safepoint. This code will become racy with the potential change for deallocating jmethodIDs.
>>
>> Tested with tier1-4, vmTestbase/nsk/jvmti java/lang/instrument tests (in case they're not in tier1-4).
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Refactoring suggested by Serguei.
Thanks for reviewing this Dan. I've fixed the nits you pointed out.
I ran tier1-4 which includes JDI tests, but I'll run 5, 6 tonight.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18549#pullrequestreview-1978241218
PR Comment: https://git.openjdk.org/jdk/pull/18549#issuecomment-2035752492
More information about the serviceability-dev
mailing list