On Thu, 4 Feb 2021 12:54:43 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> This patch moves some sanity checking done in ClassLoader.java to the 
>> corresponding endpoints in native or VM code.
>
> src/java.base/share/classes/java/lang/ClassLoader.java line 1259:
> 
>> 1257:     Class<?> findBootstrapClassOrNull(String name) {
>> 1258:         return findBootstrapClass(name);
>> 1259:     }
> 
> I'm confused why this would improve performance.  Wouldn't avoiding the 
> transition between Java to the VM be good?  Or is checkName seldom false, so 
> we're checking valid names for nothing?

It's practically never false, so the checking done here is just extra work. The 
patch skips execution of a few thousand bytecode on startup as is, but I'm 
reworking it to try and get rid of the last remaining checkName use clean up 
the verifyFixClassName/fixClassName use to perhaps consolidate code there for a 
bit.

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

PR: https://git.openjdk.java.net/jdk/pull/2378

Reply via email to