RFR: 8332457: Examine startup overheads from JDK-8294961 [v3]

Adam Sotona asotona at openjdk.org
Mon May 27 16:11:02 UTC 2024


On Mon, 27 May 2024 12:24:31 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   performance improvements
>
> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 822:
> 
>> 820:                .iconst_0() // false
>> 821:                .aload(0)// classLoader
>> 822:                .invokestatic(CD_Class, "forName", MTD_Class_String_boolean_ClassLoader);
> 
> We can probably replace this `forName(name, false, thisClassLoader)` with loading a class constant to reduce load on symbols.

I'm wondering why all the `Class.forName(... <proxyClass>.getClassLoader())` is necessary?
Simple `ldc <class entry>` seems to work well.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19410#discussion_r1616232095


More information about the core-libs-dev mailing list