RFR: 8275318: loaded_classes_do may see ArrayKlass before InstanceKlass is loaded
Coleen Phillimore
coleenp at openjdk.java.net
Thu Jan 13 23:06:22 UTC 2022
On Thu, 13 Jan 2022 20:57:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> When a shared class K is restored, all of its archived array classes K[], K[][], etc, are also restored as well. Such restored classes are placed in the ClassLoaderData::_klasses list.
>
> For safety, ClassLoaderData::loaded_classes_do() should skip all these classes until K is marked as "loaded".
Looks good. Just a small comment.
src/hotspot/share/classfile/classLoaderData.cpp line 368:
> 366: continue;
> 367: }
> 368: } else if (k->is_objArray_klass()) {
I was wondering if it would help performance to also check is_shared() ?
-------------
Marked as reviewed by coleenp (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7069
More information about the hotspot-runtime-dev
mailing list