On Tue, 17 Jun 2025 05:24:57 GMT, Axel Boldt-Christmas <[email protected]>
wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix formatting errors.
>
> src/hotspot/share/oops/jmethodIDTable.cpp line 126:
>
>> 124: static bool needs_resize(Thread* current) {
>> 125: return ((_jmethodID_counter > (_resize_load_trigger *
>> table_size(current))) &&
>> 126: !_jmethod_id_table->is_max_size_reached());
>
> Should we not just have a separate jmethodID entry count variable we use here
> instead, that is incremented and decremented on insert and remove. Rather
> than using the next jmethodID counter which just grows monotonically
> regardless of any removals.
If we remove a jmethodID, we need to keep the number for it in case some JVMTI
code still thinks that number is valid. So we can't decrement the entry count.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2152136500