47 #include "oops/methodData.hpp"
48 #include "oops/objArrayKlass.hpp"
49 #include "oops/oop.inline.hpp"
50 #include "oops/oop.inline2.hpp"
51 #include "oops/typeArrayKlass.hpp"
52 #include "prims/jvmtiEnvBase.hpp"
53 #include "prims/methodHandles.hpp"
54 #include "runtime/arguments.hpp"
55 #include "runtime/biasedLocking.hpp"
56 #include "runtime/fieldType.hpp"
57 #include "runtime/handles.inline.hpp"
58 #include "runtime/java.hpp"
59 #include "runtime/javaCalls.hpp"
60 #include "runtime/mutexLocker.hpp"
61 #include "runtime/orderAccess.inline.hpp"
62 #include "runtime/signature.hpp"
63 #include "services/classLoadingService.hpp"
64 #include "services/threadService.hpp"
65 #include "utilities/macros.hpp"
66 #include "utilities/ticks.hpp"
67
68 #if INCLUDE_TRACE
69 #include "trace/tracing.hpp"
70 #endif
71
72 Dictionary* SystemDictionary::_dictionary = NULL;
73 PlaceholderTable* SystemDictionary::_placeholders = NULL;
74 Dictionary* SystemDictionary::_shared_dictionary = NULL;
75 LoaderConstraintTable* SystemDictionary::_loader_constraints = NULL;
76 ResolutionErrorTable* SystemDictionary::_resolution_errors = NULL;
77 SymbolPropertyTable* SystemDictionary::_invoke_method_table = NULL;
78
79
80 int SystemDictionary::_number_of_modifications = 0;
81 int SystemDictionary::_sdgeneration = 0;
82 const int SystemDictionary::_primelist[_prime_array_size] = {1009,2017,4049,5051,10103,
83 20201,40423,99991};
84
85 oop SystemDictionary::_system_loader_lock_obj = NULL;
86
87 Klass* SystemDictionary::_well_known_klasses[SystemDictionary::WKID_LIMIT]
88 = { NULL /*, NULL...*/ };
89
2647 constraints()->verify(dictionary(), placeholders());
2648 }
2649
2650 // utility function for class load event
2651 void SystemDictionary::post_class_load_event(const Ticks& start_time,
2652 instanceKlassHandle k,
2653 Handle initiating_loader) {
2654 #if INCLUDE_TRACE
2655 EventClassLoad event(UNTIMED);
2656 if (event.should_commit()) {
2657 event.set_starttime(start_time);
2658 event.set_loadedClass(k());
2659 oop defining_class_loader = k->class_loader();
2660 event.set_definingClassLoader(defining_class_loader != NULL ?
2661 defining_class_loader->klass() : (Klass*)NULL);
2662 oop class_loader = initiating_loader.is_null() ? (oop)NULL : initiating_loader();
2663 event.set_initiatingClassLoader(class_loader != NULL ?
2664 class_loader->klass() : (Klass*)NULL);
2665 event.commit();
2666 }
2667 #endif /* INCLUDE_TRACE */
2668 }
2669
2670 #ifndef PRODUCT
2671
2672 // statistics code
2673 class ClassStatistics: AllStatic {
2674 private:
2675 static int nclasses; // number of classes
2676 static int nmethods; // number of methods
2677 static int nmethoddata; // number of methodData
2678 static int class_size; // size of class objects in words
2679 static int method_size; // size of method objects in words
2680 static int debug_size; // size of debug info in methods
2681 static int methoddata_size; // size of methodData objects in words
2682
2683 static void do_class(Klass* k) {
2684 nclasses++;
2685 class_size += k->size();
2686 if (k->oop_is_instance()) {
2687 InstanceKlass* ik = (InstanceKlass*)k;
|
47 #include "oops/methodData.hpp"
48 #include "oops/objArrayKlass.hpp"
49 #include "oops/oop.inline.hpp"
50 #include "oops/oop.inline2.hpp"
51 #include "oops/typeArrayKlass.hpp"
52 #include "prims/jvmtiEnvBase.hpp"
53 #include "prims/methodHandles.hpp"
54 #include "runtime/arguments.hpp"
55 #include "runtime/biasedLocking.hpp"
56 #include "runtime/fieldType.hpp"
57 #include "runtime/handles.inline.hpp"
58 #include "runtime/java.hpp"
59 #include "runtime/javaCalls.hpp"
60 #include "runtime/mutexLocker.hpp"
61 #include "runtime/orderAccess.inline.hpp"
62 #include "runtime/signature.hpp"
63 #include "services/classLoadingService.hpp"
64 #include "services/threadService.hpp"
65 #include "utilities/macros.hpp"
66 #include "utilities/ticks.hpp"
67 #if INCLUDE_TRACE
68 #include "trace/tracing.hpp"
69 #endif
70
71 Dictionary* SystemDictionary::_dictionary = NULL;
72 PlaceholderTable* SystemDictionary::_placeholders = NULL;
73 Dictionary* SystemDictionary::_shared_dictionary = NULL;
74 LoaderConstraintTable* SystemDictionary::_loader_constraints = NULL;
75 ResolutionErrorTable* SystemDictionary::_resolution_errors = NULL;
76 SymbolPropertyTable* SystemDictionary::_invoke_method_table = NULL;
77
78
79 int SystemDictionary::_number_of_modifications = 0;
80 int SystemDictionary::_sdgeneration = 0;
81 const int SystemDictionary::_primelist[_prime_array_size] = {1009,2017,4049,5051,10103,
82 20201,40423,99991};
83
84 oop SystemDictionary::_system_loader_lock_obj = NULL;
85
86 Klass* SystemDictionary::_well_known_klasses[SystemDictionary::WKID_LIMIT]
87 = { NULL /*, NULL...*/ };
88
2646 constraints()->verify(dictionary(), placeholders());
2647 }
2648
2649 // utility function for class load event
2650 void SystemDictionary::post_class_load_event(const Ticks& start_time,
2651 instanceKlassHandle k,
2652 Handle initiating_loader) {
2653 #if INCLUDE_TRACE
2654 EventClassLoad event(UNTIMED);
2655 if (event.should_commit()) {
2656 event.set_starttime(start_time);
2657 event.set_loadedClass(k());
2658 oop defining_class_loader = k->class_loader();
2659 event.set_definingClassLoader(defining_class_loader != NULL ?
2660 defining_class_loader->klass() : (Klass*)NULL);
2661 oop class_loader = initiating_loader.is_null() ? (oop)NULL : initiating_loader();
2662 event.set_initiatingClassLoader(class_loader != NULL ?
2663 class_loader->klass() : (Klass*)NULL);
2664 event.commit();
2665 }
2666 #endif // INCLUDE_TRACE
2667 }
2668
2669 #ifndef PRODUCT
2670
2671 // statistics code
2672 class ClassStatistics: AllStatic {
2673 private:
2674 static int nclasses; // number of classes
2675 static int nmethods; // number of methods
2676 static int nmethoddata; // number of methodData
2677 static int class_size; // size of class objects in words
2678 static int method_size; // size of method objects in words
2679 static int debug_size; // size of debug info in methods
2680 static int methoddata_size; // size of methodData objects in words
2681
2682 static void do_class(Klass* k) {
2683 nclasses++;
2684 class_size += k->size();
2685 if (k->oop_is_instance()) {
2686 InstanceKlass* ik = (InstanceKlass*)k;
|