RFR: 8261031: Move some ClassLoader name checking to native/VM

Coleen Phillimore coleenp at openjdk.java.net
Thu Feb 4 13:16:41 UTC 2021


On Wed, 3 Feb 2021 12:21:30 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> This patch moves some sanity checking done in ClassLoader.java to the corresponding endpoints in native or VM code.

Changes requested by coleenp (Reviewer).

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?

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

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


More information about the core-libs-dev mailing list