RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v3]
Claes Redestad
redestad at openjdk.org
Mon Apr 15 14:44:00 UTC 2024
On Fri, 12 Apr 2024 15:06:36 GMT, Chen Liang <liach at openjdk.org> wrote:
>> I'd prefer considering such optimizations as follow-ups. We need to think about where to define such shared classes in a way that considers the full lifecycle, facilitates class unloading (one cache per classloader?) while still getting good reuse.
>
> I think `Invokers` might be a good place. Its lifetime is bound to its MT, and MT already handles class unloading well. If we are doing erased then a plain array suffices.
I think we should be wary about adding things that are strongly kept alive by the MT. While the MTs themselves are weakly referenced and can be unloaded if all usage goes aways, many oft-used MTs might be kept effectively forever.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18690#discussion_r1565912250
More information about the core-libs-dev
mailing list