< prev index next >

src/hotspot/share/cds/cdsConfig.hpp

Print this page
@@ -27,10 +27,11 @@
  
  #include "memory/allStatic.hpp"
  #include "utilities/globalDefinitions.hpp"
  #include "utilities/macros.hpp"
  
+ class InstanceKlass;
  class JavaThread;
  
  class CDSConfig : public AllStatic {
  #if INCLUDE_CDS
    static bool _is_dumping_static_archive;

@@ -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 _has_archived_invokedynamic;
+   static bool _is_loading_packages;
+   static bool _is_loading_protection_domains;
+   static bool _is_security_manager_allowed;
  
    static char* _default_archive_path;
    static char* _static_archive_path;
    static char* _dynamic_archive_path;
  

@@ -63,17 +67,23 @@
    static void check_aot_flags();
    static void check_aotmode_off();
    static void check_aotmode_auto_or_on();
    static void check_aotmode_record();
    static void check_aotmode_create();
+   static void setup_compiler_args();
+   static bool setup_experimental_leyden_workflow(bool xshare_auto_cmd_line); // Deprecated -- to be removed
  
  public:
    // Used by jdk.internal.misc.CDS.getCDSConfigStatus();
    static const int IS_DUMPING_ARCHIVE              = 1 << 0;
    static const int IS_DUMPING_STATIC_ARCHIVE       = 1 << 1;
    static const int IS_LOGGING_LAMBDA_FORM_INVOKERS = 1 << 2;
    static const int IS_USING_ARCHIVE                = 1 << 3;
+   static const int IS_DUMPING_HEAP                 = 1 << 4;
+   static const int IS_LOGGING_DYNAMIC_PROXIES      = 1 << 5;
+   static const int IS_DUMPING_PACKAGES             = 1 << 6;
+   static const int IS_DUMPING_PROTECTION_DOMAINS   = 1 << 7;
    static int get_status() NOT_CDS_RETURN_(0);
  
    // Initialization and command-line checking
    static void initialize() NOT_CDS_RETURN;
    static void set_old_cds_flags_used()                       { CDS_ONLY(_old_cds_flags_used = true); }

@@ -81,11 +91,11 @@
    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 void check_unsupported_dumping_module_options() 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 bool check_vm_args_consistency(bool patch_mod_javabase, bool mode_flag_cmd_line, bool xshare_auto_cmd_line) NOT_CDS_RETURN_(true);
    static const char* type_of_archive_being_loaded();
    static const char* type_of_archive_being_written();
  
    // --- Basic CDS features
  

@@ -93,13 +103,15 @@
    static bool is_dumping_archive()                           { return is_dumping_static_archive() || is_dumping_dynamic_archive(); }
    static bool is_using_archive()                             NOT_CDS_RETURN_(false);
    static int num_archives(const char* archive_path)          NOT_CDS_RETURN_(0);
  
    // static_archive
-   static bool is_dumping_static_archive()                    { return CDS_ONLY(_is_dumping_static_archive) NOT_CDS(false); }
+   static bool is_dumping_static_archive()                    { return (CDS_ONLY(_is_dumping_static_archive) NOT_CDS(false))
+                                                                     || is_dumping_final_static_archive(); }
    static void enable_dumping_static_archive()                { CDS_ONLY(_is_dumping_static_archive = true); }
  
+ 
    // A static CDS archive can be dumped in three modes:
    //
    // "classic"   - This is the traditional CDS workflow of
    //               "java -Xshare:dump -XX:SharedClassListFile=file.txt".
    //

@@ -116,27 +128,30 @@
    //
    // The main structural difference between "preimage" and "final" is that the preimage
    // - has a different magic number (0xcafea07c)
    // - does not have any archived Java heap objects
    // - does not have aot-linked classes
-   static bool is_dumping_classic_static_archive()            NOT_CDS_RETURN_(false);
-   static bool is_dumping_preimage_static_archive()           NOT_CDS_RETURN_(false);
-   static bool is_dumping_final_static_archive()              NOT_CDS_RETURN_(false);
+   static bool is_dumping_classic_static_archive()                NOT_CDS_RETURN_(false);
+   static bool is_dumping_preimage_static_archive()               NOT_CDS_RETURN_(false);
+   static bool is_dumping_preimage_static_archive_with_triggers() NOT_CDS_RETURN_(false); 
+   static bool is_dumping_final_static_archive()                  NOT_CDS_RETURN_(false);
  
    // dynamic_archive
    static bool is_dumping_dynamic_archive()                   { return CDS_ONLY(_is_dumping_dynamic_archive) NOT_CDS(false); }
    static void enable_dumping_dynamic_archive()               { CDS_ONLY(_is_dumping_dynamic_archive = true); }
    static void disable_dumping_dynamic_archive()              { CDS_ONLY(_is_dumping_dynamic_archive = false); }
  
    // Misc CDS features
+   static bool preserve_all_dumptime_verification_states(const InstanceKlass* ik);
    static bool allow_only_single_java_thread()                NOT_CDS_RETURN_(false);
  
    // optimized_module_handling -- can we skip some expensive operations related to modules?
    static bool is_using_optimized_module_handling()           { return CDS_ONLY(_is_using_optimized_module_handling) NOT_CDS(false); }
    static void stop_using_optimized_module_handling()         NOT_CDS_RETURN;
  
    static bool is_logging_lambda_form_invokers()              NOT_CDS_RETURN_(false);
+   static bool is_dumping_regenerated_lambdaform_invokers()   NOT_CDS_RETURN_(false);
  
    static bool is_dumping_aot_linked_classes()                NOT_CDS_JAVA_HEAP_RETURN_(false);
    static bool is_using_aot_linked_classes()                  NOT_CDS_JAVA_HEAP_RETURN_(false);
    static void set_has_aot_linked_classes(bool has_aot_linked_classes) NOT_CDS_JAVA_HEAP_RETURN;
  

@@ -161,16 +176,40 @@
  
    static bool is_dumping_invokedynamic()                     NOT_CDS_JAVA_HEAP_RETURN_(false);
    static bool is_loading_invokedynamic()                     NOT_CDS_JAVA_HEAP_RETURN_(false);
    static void set_has_archived_invokedynamic()               { CDS_JAVA_HEAP_ONLY(_has_archived_invokedynamic = true); }
  
+   static bool is_dumping_packages()                          NOT_CDS_JAVA_HEAP_RETURN_(false);
+   static bool is_loading_packages()                          NOT_CDS_JAVA_HEAP_RETURN_(false);
+   static void set_is_loading_packages()                      { CDS_JAVA_HEAP_ONLY(_is_loading_packages = true); }
+ 
+   static bool is_dumping_protection_domains()                NOT_CDS_JAVA_HEAP_RETURN_(false);
+   static bool is_loading_protection_domains()                NOT_CDS_JAVA_HEAP_RETURN_(false);
+   static void set_is_loading_protection_domains()            { CDS_JAVA_HEAP_ONLY(_is_loading_protection_domains = true); }
+ 
+   static bool is_dumping_reflection_data()                   NOT_CDS_JAVA_HEAP_RETURN_(false);
+ 
+   static bool is_dumping_dynamic_proxies()                   NOT_CDS_JAVA_HEAP_RETURN_(false);
+   static bool is_logging_dynamic_proxies()                   NOT_CDS_RETURN_(false);
+ 
    // full_module_graph (requires optimized_module_handling)
    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;
  
+   // --- AOT compiler
+ 
+   static bool is_dumping_cached_code()                       NOT_CDS_RETURN_(false);
+   static void disable_dumping_cached_code()                  NOT_CDS_RETURN;
+   static void enable_dumping_cached_code()                   NOT_CDS_RETURN;
+ 
+   static bool is_dumping_adapters()                          NOT_CDS_RETURN_(false);
+ 
+   // Are we using the (to be deprecated) -XX:CacheDataStore workflow?
+   static bool is_experimental_leyden_workflow()              NOT_CDS_RETURN_(false);
+ 
    // 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 >