< prev index next >

src/hotspot/share/cds/cdsConfig.hpp

Print this page

  1 /*
  2  * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 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  *

 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 

  1 /*
  2  * Copyright (c) 2023, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 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  *

 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 
< prev index next >