RFR: 8304996: Add missing Handlemarks

Aleksey Shipilev shade at openjdk.org
Wed Mar 29 08:43:03 UTC 2023


On Tue, 28 Mar 2023 20:51:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

> The review for [JDK-8304147](https://bugs.openjdk.org/browse/JDK-8304147) pointed out that the top-level HandleMark in dump_for_exit (added to replace the previous coverage from a HandleMarkCleaner in JVM_ENTRY) was not in the right place as no Handles were being used there. Removing that HM and fixing up the ensuing failures led to a set of fixes where HM's were missing at the place of Handle usage.
> 
> Testing: tiers 1-4
> 
> Thanks.

I think the issue synopsis should be capitalized: "Add missing HandleMarks". Also, does it cover the cases that were not covered by `dump_at_exit` `HandleMark` before? If not, then it is not adding "missing" HMs.

src/hotspot/share/oops/klassVtable.cpp line 1178:

> 1176: 
> 1177:   assert(_size_method_table == supers->length(), "wrong size");
> 1178:   HandleMark hm(THREAD);

Question: Would this make the handles area grow up to `_size_method_table` in the worst case? I thought we want to have `HandleMark`-s closer to actual handle creation/last-use to keep the footprint at bay.

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

PR Review: https://git.openjdk.org/jdk/pull/13215#pullrequestreview-1362538364
PR Review Comment: https://git.openjdk.org/jdk/pull/13215#discussion_r1151584904


More information about the hotspot-runtime-dev mailing list