< prev index next >

src/hotspot/share/cds/aotLinkedClassBulkLoader.hpp

Print this page

30 #include "runtime/handles.hpp"
31 #include "utilities/exceptions.hpp"
32 #include "utilities/macros.hpp"
33 
34 class AOTLinkedClassTable;
35 class ClassLoaderData;
36 class InstanceKlass;
37 class SerializeClosure;
38 template <typename T> class Array;
39 enum class AOTLinkedClassCategory : int;
40 
41 // During a Production Run, the AOTLinkedClassBulkLoader loads all classes from
42 // a AOTLinkedClassTable into their respective ClassLoaders. This happens very early
43 // in the JVM bootstrap stage, before any application code is executed.
44 //
45 class AOTLinkedClassBulkLoader :  AllStatic {
46   static bool _boot2_completed;
47   static bool _platform_completed;
48   static bool _app_completed;
49   static bool _all_completed;



50   static void load_classes_in_loader(JavaThread* current, AOTLinkedClassCategory class_category, oop class_loader_oop);
51   static void load_classes_in_loader_impl(AOTLinkedClassCategory class_category, oop class_loader_oop, TRAPS);
52   static void load_table(AOTLinkedClassTable* table, AOTLinkedClassCategory class_category, Handle loader, TRAPS);
53   static void initiate_loading(JavaThread* current, const char* category, Handle initiating_loader, Array<InstanceKlass*>* classes);
54   static void load_classes_impl(AOTLinkedClassCategory class_category, Array<InstanceKlass*>* classes,
55                                 const char* category_name, Handle loader, TRAPS);
56   static void load_hidden_class(ClassLoaderData* loader_data, InstanceKlass* ik, TRAPS);
57   static void init_required_classes_for_loader(Handle class_loader, Array<InstanceKlass*>* classes, TRAPS);

58 public:
59   static void serialize(SerializeClosure* soc, bool is_static_archive) NOT_CDS_RETURN;
60 
61   static void load_javabase_classes(JavaThread* current) NOT_CDS_RETURN;
62   static void load_non_javabase_classes(JavaThread* current) NOT_CDS_RETURN;
63   static void finish_loading_javabase_classes(TRAPS) NOT_CDS_RETURN;
64   static void exit_on_exception(JavaThread* current);
65 


66   static bool is_pending_aot_linked_class(Klass* k) NOT_CDS_RETURN_(false);
67 };
68 
69 #endif // SHARE_CDS_AOTLINKEDCLASSBULKLOADER_HPP

30 #include "runtime/handles.hpp"
31 #include "utilities/exceptions.hpp"
32 #include "utilities/macros.hpp"
33 
34 class AOTLinkedClassTable;
35 class ClassLoaderData;
36 class InstanceKlass;
37 class SerializeClosure;
38 template <typename T> class Array;
39 enum class AOTLinkedClassCategory : int;
40 
41 // During a Production Run, the AOTLinkedClassBulkLoader loads all classes from
42 // a AOTLinkedClassTable into their respective ClassLoaders. This happens very early
43 // in the JVM bootstrap stage, before any application code is executed.
44 //
45 class AOTLinkedClassBulkLoader :  AllStatic {
46   static bool _boot2_completed;
47   static bool _platform_completed;
48   static bool _app_completed;
49   static bool _all_completed;
50   static bool _preloading_non_javavase_classes;
51   static Array<InstanceKlass*>* _unregistered_classes_from_preimage;
52 
53   static void load_classes_in_loader(JavaThread* current, AOTLinkedClassCategory class_category, oop class_loader_oop);
54   static void load_classes_in_loader_impl(AOTLinkedClassCategory class_category, oop class_loader_oop, TRAPS);
55   static void load_table(AOTLinkedClassTable* table, AOTLinkedClassCategory class_category, Handle loader, TRAPS);
56   static void initiate_loading(JavaThread* current, const char* category, Handle initiating_loader, Array<InstanceKlass*>* classes);
57   static void load_classes_impl(AOTLinkedClassCategory class_category, Array<InstanceKlass*>* classes,
58                                 const char* category_name, Handle loader, TRAPS);
59   static void load_hidden_class(ClassLoaderData* loader_data, InstanceKlass* ik, TRAPS);
60   static void init_required_classes_for_loader(Handle class_loader, Array<InstanceKlass*>* classes, TRAPS);
61   static void replay_training_at_init(Array<InstanceKlass*>* classes, TRAPS) NOT_CDS_RETURN;
62 public:
63   static void serialize(SerializeClosure* soc, bool is_static_archive) NOT_CDS_RETURN;
64   static void record_unregistered_classes() NOT_CDS_RETURN;
65   static void load_javabase_classes(JavaThread* current) NOT_CDS_RETURN;
66   static void load_non_javabase_classes(JavaThread* current) NOT_CDS_RETURN;
67   static void finish_loading_javabase_classes(TRAPS) NOT_CDS_RETURN;
68   static void exit_on_exception(JavaThread* current);
69   static void replay_training_at_init_for_preloaded_classes(TRAPS) NOT_CDS_RETURN;
70   static bool class_preloading_finished();
71   static void print_counters_on(outputStream* st) NOT_CDS_RETURN;
72   static bool is_pending_aot_linked_class(Klass* k) NOT_CDS_RETURN_(false);
73 };
74 
75 #endif // SHARE_CDS_AOTLINKEDCLASSBULKLOADER_HPP
< prev index next >