17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classFileParser.hpp"
27 #include "classfile/classFileStream.hpp"
28 #include "classfile/classLoader.hpp"
29 #include "classfile/classLoaderData.hpp"
30 #include "classfile/classLoaderData.inline.hpp"
31 #include "classfile/klassFactory.hpp"
32 #include "classfile/sharedClassUtil.hpp"
33 #include "memory/metaspaceShared.hpp"
34 #include "memory/resourceArea.hpp"
35 #include "prims/jvmtiEnvBase.hpp"
36 #include "prims/jvmtiRedefineClasses.hpp"
37 #include "trace/traceMacros.hpp"
38
39 // called during initial loading of a shared class
40 InstanceKlass* KlassFactory::check_shared_class_file_load_hook(
41 InstanceKlass* ik,
42 Symbol* class_name,
43 Handle class_loader,
44 Handle protection_domain, TRAPS) {
45 #if INCLUDE_CDS && INCLUDE_JVMTI
46 assert(ik != NULL, "sanity");
47 assert(ik->is_shared(), "expecting a shared class");
48
49 if (JvmtiExport::should_post_class_file_load_hook()) {
50 assert(THREAD->is_Java_thread(), "must be JavaThread");
51
52 // Post the CFLH
53 JvmtiCachedClassFileData* cached_class_file = NULL;
54 JvmtiCachedClassFileData* archived_class_data = ik->get_archived_class_data();
55 assert(archived_class_data != NULL, "shared class has no archived class data");
56 unsigned char* ptr =
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/classFileParser.hpp"
27 #include "classfile/classFileStream.hpp"
28 #include "classfile/classLoader.hpp"
29 #include "classfile/classLoaderData.hpp"
30 #include "classfile/classLoaderData.inline.hpp"
31 #include "classfile/klassFactory.hpp"
32 #include "classfile/sharedClassUtil.hpp"
33 #include "memory/metaspaceShared.hpp"
34 #include "memory/resourceArea.hpp"
35 #include "prims/jvmtiEnvBase.hpp"
36 #include "prims/jvmtiRedefineClasses.hpp"
37 #include "runtime/handles.inline.hpp"
38 #include "trace/traceMacros.hpp"
39
40 // called during initial loading of a shared class
41 InstanceKlass* KlassFactory::check_shared_class_file_load_hook(
42 InstanceKlass* ik,
43 Symbol* class_name,
44 Handle class_loader,
45 Handle protection_domain, TRAPS) {
46 #if INCLUDE_CDS && INCLUDE_JVMTI
47 assert(ik != NULL, "sanity");
48 assert(ik->is_shared(), "expecting a shared class");
49
50 if (JvmtiExport::should_post_class_file_load_hook()) {
51 assert(THREAD->is_Java_thread(), "must be JavaThread");
52
53 // Post the CFLH
54 JvmtiCachedClassFileData* cached_class_file = NULL;
55 JvmtiCachedClassFileData* archived_class_data = ik->get_archived_class_data();
56 assert(archived_class_data != NULL, "shared class has no archived class data");
57 unsigned char* ptr =
|