RFR: 8305252: make_method_handle_intrinsic may call java code under a lock [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Apr 19 12:31:52 UTC 2023


On Wed, 19 Apr 2023 06:33: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:
>> 
>>   Update method deallocate_contents comments.
>
> src/hotspot/share/oops/method.cpp line 138:
> 
>> 136:   MetadataFactory::free_metadata(loader_data, method_counters());
>> 137:   clear_method_counters();
>> 138:   // The nmethod will be gone when we get here, for redefinition but not
> 
> Nit: the comma should be after redefinition. But is that the only reason to get here? What about regular class unloading?
> 
> The method comment on lines 129/130 also needs updating.

I updated the comment.  Regular class unloading does not get here.  The Metaspace containing the Method is released, not requiring individual metadata deallocation.
This is tested with normal execution when the race to create method handle intrinsic Method is lost.  I counted ~20 with logging for Dacapo.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13308#discussion_r1171266019


More information about the hotspot-dev mailing list