RFR: 8268406: Deallocate jmethodID native memory [v2]
Coleen Phillimore
coleenp at openjdk.org
Tue Jun 17 12:31:30 UTC 2025
On Tue, 17 Jun 2025 02:53:12 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix formatting errors.
>
> src/hotspot/share/oops/instanceKlass.cpp line 2480:
>
>> 2478: void InstanceKlass::make_methods_jmethod_ids() {
>> 2479: MutexLocker ml(JmethodIdCreation_lock, Mutex::_no_safepoint_check_flag);
>> 2480: jmethodID* jmeths = methods_jmethod_ids_acquire();
>
> Technically you don't need acquire semantics here as this value is not used to then access other data. But I see this is the only getter API available.
Yes, this does need an acquire getter outside the lock. It's better to not have a non-acquire version to be possibly used by accident.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2152140447
More information about the hotspot-dev
mailing list