37 #include "classfile/vmSymbols.hpp" |
37 #include "classfile/vmSymbols.hpp" |
38 #include "compiler/compileBroker.hpp" |
38 #include "compiler/compileBroker.hpp" |
39 #include "interpreter/bytecodeStream.hpp" |
39 #include "interpreter/bytecodeStream.hpp" |
40 #include "interpreter/interpreter.hpp" |
40 #include "interpreter/interpreter.hpp" |
41 #include "jfr/jfrEvents.hpp" |
41 #include "jfr/jfrEvents.hpp" |
|
42 #include "jfr/jni/jfrUpcalls.hpp" |
42 #include "memory/filemap.hpp" |
43 #include "memory/filemap.hpp" |
43 #include "memory/gcLocker.hpp" |
44 #include "memory/gcLocker.hpp" |
44 #include "memory/oopFactory.hpp" |
45 #include "memory/oopFactory.hpp" |
45 #include "oops/instanceKlass.hpp" |
46 #include "oops/instanceKlass.hpp" |
46 #include "oops/instanceRefKlass.hpp" |
47 #include "oops/instanceRefKlass.hpp" |
92 bool SystemDictionary::_has_checkPackageAccess = false; |
93 bool SystemDictionary::_has_checkPackageAccess = false; |
93 |
94 |
94 // lazily initialized klass variables |
95 // lazily initialized klass variables |
95 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; |
96 Klass* volatile SystemDictionary::_abstract_ownable_synchronizer_klass = NULL; |
96 |
97 |
|
98 #if INCLUDE_JFR |
|
99 static const Symbol* jfr_event_handler_proxy = NULL; |
|
100 #endif // INCLUDE_JFR |
97 |
101 |
98 // ---------------------------------------------------------------------------- |
102 // ---------------------------------------------------------------------------- |
99 // Java-level SystemLoader |
103 // Java-level SystemLoader |
100 |
104 |
101 oop SystemDictionary::java_system_loader() { |
105 oop SystemDictionary::java_system_loader() { |
1331 |
1335 |
1332 // find_or_define_instance_class may return a different InstanceKlass |
1336 // find_or_define_instance_class may return a different InstanceKlass |
1333 if (!k.is_null()) { |
1337 if (!k.is_null()) { |
1334 k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh)); |
1338 k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh)); |
1335 } |
1339 } |
|
1340 #if INCLUDE_JFR |
|
1341 else { |
|
1342 assert(jfr_event_handler_proxy != NULL, "invariant"); |
|
1343 if (class_name == jfr_event_handler_proxy) { |
|
1344 // EventHandlerProxy class is generated dynamically in |
|
1345 // EventHandlerProxyCreator::makeEventHandlerProxyClass |
|
1346 // method, so we generate a Java call from here. |
|
1347 // |
|
1348 // EventHandlerProxy class will finally be defined in |
|
1349 // SystemDictionary::resolve_from_stream method, down |
|
1350 // the call stack. Bootstrap classloader is parallel-capable, |
|
1351 // so no concurrency issues are expected. |
|
1352 CLEAR_PENDING_EXCEPTION; |
|
1353 k = JfrUpcalls::load_event_handler_proxy_class(THREAD); |
|
1354 assert(!k.is_null(), "invariant"); |
|
1355 } |
|
1356 } |
|
1357 #endif // INCLUDE_JFR |
|
1358 |
1336 return k; |
1359 return k; |
1337 } else { |
1360 } else { |
1338 // Use user specified class loader to load class. Call loadClass operation on class_loader. |
1361 // Use user specified class loader to load class. Call loadClass operation on class_loader. |
1339 ResourceMark rm(THREAD); |
1362 ResourceMark rm(THREAD); |
1340 |
1363 |
1884 |
1907 |
1885 // Allocate private object used as system class loader lock |
1908 // Allocate private object used as system class loader lock |
1886 _system_loader_lock_obj = oopFactory::new_intArray(0, CHECK); |
1909 _system_loader_lock_obj = oopFactory::new_intArray(0, CHECK); |
1887 // Initialize basic classes |
1910 // Initialize basic classes |
1888 initialize_preloaded_classes(CHECK); |
1911 initialize_preloaded_classes(CHECK); |
|
1912 #if INCLUDE_JFR |
|
1913 jfr_event_handler_proxy = SymbolTable::new_permanent_symbol("jdk/jfr/proxy/internal/EventHandlerProxy", CHECK); |
|
1914 #endif // INCLUDE_JFR |
1889 } |
1915 } |
1890 |
1916 |
1891 // Compact table of directions on the initialization of klasses: |
1917 // Compact table of directions on the initialization of klasses: |
1892 static const short wk_init_info[] = { |
1918 static const short wk_init_info[] = { |
1893 #define WK_KLASS_INIT_INFO(name, symbol, option) \ |
1919 #define WK_KLASS_INIT_INFO(name, symbol, option) \ |