< prev index next >

src/hotspot/share/memory/metaspaceTracer.cpp

Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com

*** 1,7 **** /* ! * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 60,73 **** MetaspaceObj::Type objtype, Metaspace::MetadataType mdtype) const { E event; if (event.should_commit()) { event.set_classLoader(cld); ! if (cld->is_unsafe_anonymous()) { ! event.set_unsafeAnonymousClassLoader(true); } else { ! event.set_unsafeAnonymousClassLoader(false); } event.set_size(word_size * BytesPerWord); event.set_metadataType((u1) mdtype); event.set_metaspaceObjectType((u1) objtype); event.commit(); --- 60,78 ---- MetaspaceObj::Type objtype, Metaspace::MetadataType mdtype) const { E event; if (event.should_commit()) { event.set_classLoader(cld); ! event.set_unsafeAnonymousClassLoader(false); // initialize these ! event.set_hiddenClassLoader(false); ! if (cld->has_class_mirror_holder()) { ! assert(cld->klasses() != NULL, "unexpected NULL for cld->klasses()"); ! if (cld->klasses()->is_hidden_weak()) { ! event.set_hiddenClassLoader(true); } else { ! event.set_unsafeAnonymousClassLoader(true); ! } } event.set_size(word_size * BytesPerWord); event.set_metadataType((u1) mdtype); event.set_metaspaceObjectType((u1) objtype); event.commit();
< prev index next >