Alan,

Reflection methods are ignored by the stack walk in
JVM_LatestUserDefinedLoader.  That was why I marked
jdk.internal.reflect.DelegatingClassLoader as not a user-defined class.

If the optimization is disabled, then so be it.  I am using SPECjbb2015
as an example sophisticated Java application.  I think there are plenty
of applications that use ObjectInputStream that do not define their own
ClassLoaders.  The proposed patch would help all of them run more
efficiently.

                        ... peter

-----Original Message-----
From: Alan Bateman <[email protected]>
Date: Saturday, June 13, 2020 at 9:06 AM
To: "Peter Kessler (Open Source)" <[email protected]>, Roger 
Riggs <[email protected]>, "[email protected]" 
<[email protected]>
Subject: Re: [PATCH] 8246633: Improve the performance of 
ObjectInputStream.resolveClass(ObjectStreamClass)

    On 13/06/2020 00:19, Peter Kessler (Open Source) wrote:
    > :
    >
    > I settled on a system-wide one-bit cache: There have been no
    > user-defined ClassLoaders constructed, so I can not find one on any
    > particular stack walk.  It may not be the best possible solution, but
    > it addresses the issue of useless stack walks in the common case where
    > there are no user-defined ClassLoaders.
    >
    Does this help anything other than SPECjbb2015? Real world code will use 
    core reflection and other areas of the JDK that create class loaders at 
    run-time so I assume this optimization will be disabled very quickly. I 
    think it would be better to look for other solutions.

    -Alan

Reply via email to