< prev index next >

src/hotspot/share/cds/cdsConfig.hpp

Print this page
*** 24,10 ***
--- 24,11 ---
  
  #ifndef SHARE_CDS_CDSCONFIG_HPP
  #define SHARE_CDS_CDSCONFIG_HPP
  
  #include "memory/allStatic.hpp"
+ #include "runtime/arguments.hpp"
  #include "utilities/globalDefinitions.hpp"
  #include "utilities/macros.hpp"
  
  class JavaThread;
  

*** 40,10 ***
--- 41,13 ---
    static bool _is_using_optimized_module_handling;
    static bool _is_dumping_full_module_graph;
    static bool _is_using_full_module_graph;
    static bool _has_aot_linked_classes;
  
+   static bool _module_patching_disables_cds;
+   static bool _java_base_module_patching_disables_cds;
+ 
    const static char* _default_archive_path;
    const static char* _input_static_archive_path;
    const static char* _input_dynamic_archive_path;
    const static char* _output_archive_path;
  

*** 89,11 ***
    static bool old_cds_flags_used()                           { return CDS_ONLY(_old_cds_flags_used) NOT_CDS(false); }
    static bool new_aot_flags_used()                           { return CDS_ONLY(_new_aot_flags_used) NOT_CDS(false); }
    static void check_internal_module_property(const char* key, const char* value) NOT_CDS_RETURN;
    static void check_incompatible_property(const char* key, const char* value) NOT_CDS_RETURN;
    static bool has_unsupported_runtime_module_options() NOT_CDS_RETURN_(false);
!   static bool check_vm_args_consistency(bool patch_mod_javabase, bool mode_flag_cmd_line) NOT_CDS_RETURN_(true);
    static const char* type_of_archive_being_loaded();
    static const char* type_of_archive_being_written();
    static void prepare_for_dumping();
  
    // --- Basic CDS features
--- 93,16 ---
    static bool old_cds_flags_used()                           { return CDS_ONLY(_old_cds_flags_used) NOT_CDS(false); }
    static bool new_aot_flags_used()                           { return CDS_ONLY(_new_aot_flags_used) NOT_CDS(false); }
    static void check_internal_module_property(const char* key, const char* value) NOT_CDS_RETURN;
    static void check_incompatible_property(const char* key, const char* value) NOT_CDS_RETURN;
    static bool has_unsupported_runtime_module_options() NOT_CDS_RETURN_(false);
!   static bool check_vm_args_consistency(bool mode_flag_cmd_line) NOT_CDS_RETURN_(true);
+ 
+   static bool module_patching_disables_cds() { return CDS_ONLY(_module_patching_disables_cds) NOT_CDS(false); }
+   static void set_module_patching_disables_cds() { CDS_ONLY(_module_patching_disables_cds = true;) }
+   static bool java_base_module_patching_disables_cds() { return CDS_ONLY(_java_base_module_patching_disables_cds) NOT_CDS(false); }
+   static void set_java_base_module_patching_disables_cds() { CDS_ONLY(_java_base_module_patching_disables_cds = true;) }
    static const char* type_of_archive_being_loaded();
    static const char* type_of_archive_being_written();
    static void prepare_for_dumping();
  
    // --- Basic CDS features

*** 179,10 ***
--- 188,14 ---
    static bool is_dumping_full_module_graph()                 { return CDS_ONLY(_is_dumping_full_module_graph) NOT_CDS(false); }
    static bool is_using_full_module_graph()                   NOT_CDS_JAVA_HEAP_RETURN_(false);
    static void stop_dumping_full_module_graph(const char* reason = nullptr) NOT_CDS_JAVA_HEAP_RETURN;
    static void stop_using_full_module_graph(const char* reason = nullptr) NOT_CDS_JAVA_HEAP_RETURN;
  
+   static bool is_valhalla_preview() {
+     return Arguments::enable_preview() && EnableValhalla;
+   }
+ 
    // Some CDS functions assume that they are called only within a single-threaded context. I.e.,
    // they are called from:
    //    - The VM thread (e.g., inside VM_PopulateDumpSharedSpace)
    //    - The thread that performs prepatory steps before switching to the VM thread
    // Since these two threads never execute concurrently, we can avoid using locks in these CDS
< prev index next >