RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases

Chen Liang liach at openjdk.org
Thu Apr 25 16:52:40 UTC 2024


On Thu, 25 Apr 2024 14:15:56 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> Splitting out the ASM-based version from #18690 to push that first under the JBS (to help backporting). Keeping #18690 open to rebase and follow-up on this as a subtask. See discussion in that #18690 for more details, discussion and motivation for this.

Only with ASM can we realize how concise ClassFile API is!

src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 1059:

> 1057:      */
> 1058:     private static final class SimpleStringBuilderStrategy {
> 1059:         static final int CLASSFILE_VERSION = ClassFile.latestMajorVersion();

Still breaks backward ASM port, we should use a fixed version like 52 for JAVA_8 and convert to latest only in the CF conversion later.

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

PR Review: https://git.openjdk.org/jdk/pull/18953#pullrequestreview-2023078249
PR Review Comment: https://git.openjdk.org/jdk/pull/18953#discussion_r1579822765


More information about the core-libs-dev mailing list