81 public:
82 // Used by jdk.internal.misc.CDS.getCDSConfigStatus();
83 static const int IS_DUMPING_AOT_LINKED_CLASSES = 1 << 0;
84 static const int IS_DUMPING_ARCHIVE = 1 << 1;
85 static const int IS_DUMPING_METHOD_HANDLES = 1 << 2;
86 static const int IS_DUMPING_STATIC_ARCHIVE = 1 << 3;
87 static const int IS_LOGGING_LAMBDA_FORM_INVOKERS = 1 << 4;
88 static const int IS_USING_ARCHIVE = 1 << 5;
89
90 static int get_status() NOT_CDS_RETURN_(0);
91
92 // Initialization and command-line checking
93 static void ergo_initialize() NOT_CDS_RETURN;
94 static void set_old_cds_flags_used() { CDS_ONLY(_old_cds_flags_used = true); }
95 static bool old_cds_flags_used() { return CDS_ONLY(_old_cds_flags_used) NOT_CDS(false); }
96 static bool new_aot_flags_used() { return CDS_ONLY(_new_aot_flags_used) NOT_CDS(false); }
97 static void check_internal_module_property(const char* key, const char* value) NOT_CDS_RETURN;
98 static void check_incompatible_property(const char* key, const char* value) NOT_CDS_RETURN;
99 static bool has_unsupported_runtime_module_options() NOT_CDS_RETURN_(false);
100 static bool check_vm_args_consistency(bool patch_mod_javabase, bool mode_flag_cmd_line) NOT_CDS_RETURN_(true);
101 static const char* type_of_archive_being_loaded();
102 static const char* type_of_archive_being_written();
103 static void prepare_for_dumping();
104
105 static bool is_at_aot_safepoint() { return CDS_ONLY(_is_at_aot_safepoint) NOT_CDS(false); }
106 static void set_is_at_aot_safepoint(bool value) { CDS_ONLY(_is_at_aot_safepoint = value); }
107
108 // --- Basic CDS features
109
110 // archive(s) in general
111 static bool is_dumping_archive() { return is_dumping_static_archive() || is_dumping_dynamic_archive(); }
112
113 // input archive(s)
114 static bool is_using_archive() NOT_CDS_RETURN_(false);
115 static bool is_using_only_default_archive() NOT_CDS_RETURN_(false);
116
117 // static_archive
118 static bool is_dumping_static_archive() { return CDS_ONLY(_is_dumping_static_archive) NOT_CDS(false); }
119 static void enable_dumping_static_archive() { CDS_ONLY(_is_dumping_static_archive = true); }
120
|
81 public:
82 // Used by jdk.internal.misc.CDS.getCDSConfigStatus();
83 static const int IS_DUMPING_AOT_LINKED_CLASSES = 1 << 0;
84 static const int IS_DUMPING_ARCHIVE = 1 << 1;
85 static const int IS_DUMPING_METHOD_HANDLES = 1 << 2;
86 static const int IS_DUMPING_STATIC_ARCHIVE = 1 << 3;
87 static const int IS_LOGGING_LAMBDA_FORM_INVOKERS = 1 << 4;
88 static const int IS_USING_ARCHIVE = 1 << 5;
89
90 static int get_status() NOT_CDS_RETURN_(0);
91
92 // Initialization and command-line checking
93 static void ergo_initialize() NOT_CDS_RETURN;
94 static void set_old_cds_flags_used() { CDS_ONLY(_old_cds_flags_used = true); }
95 static bool old_cds_flags_used() { return CDS_ONLY(_old_cds_flags_used) NOT_CDS(false); }
96 static bool new_aot_flags_used() { return CDS_ONLY(_new_aot_flags_used) NOT_CDS(false); }
97 static void check_internal_module_property(const char* key, const char* value) NOT_CDS_RETURN;
98 static void check_incompatible_property(const char* key, const char* value) NOT_CDS_RETURN;
99 static bool has_unsupported_runtime_module_options() NOT_CDS_RETURN_(false);
100 static bool check_vm_args_consistency(bool patch_mod_javabase, bool mode_flag_cmd_line) NOT_CDS_RETURN_(true);
101
102 static const char* type_of_archive_being_loaded();
103 static const char* type_of_archive_being_written();
104 static void prepare_for_dumping();
105
106 static bool is_at_aot_safepoint() { return CDS_ONLY(_is_at_aot_safepoint) NOT_CDS(false); }
107 static void set_is_at_aot_safepoint(bool value) { CDS_ONLY(_is_at_aot_safepoint = value); }
108
109 // --- Basic CDS features
110
111 // archive(s) in general
112 static bool is_dumping_archive() { return is_dumping_static_archive() || is_dumping_dynamic_archive(); }
113
114 // input archive(s)
115 static bool is_using_archive() NOT_CDS_RETURN_(false);
116 static bool is_using_only_default_archive() NOT_CDS_RETURN_(false);
117
118 // static_archive
119 static bool is_dumping_static_archive() { return CDS_ONLY(_is_dumping_static_archive) NOT_CDS(false); }
120 static void enable_dumping_static_archive() { CDS_ONLY(_is_dumping_static_archive = true); }
121
|