465 #endif // PRODUCT
466
467 // Returns 1 if the flag is deprecated (and not yet obsolete or expired).
468 // In this case the 'version' buffer is filled in with the version number when
469 // the flag became deprecated.
470 // Returns -1 if the flag is expired or obsolete.
471 // Returns 0 otherwise.
472 static int is_deprecated_flag(const char* flag_name, JDK_Version* version);
473
474 // Return the real name for the flag passed on the command line (either an alias name or "flag_name").
475 static const char* real_flag_name(const char *flag_name);
476
477 // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
478 // Return NULL if the arg has expired.
479 static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
480 static bool lookup_logging_aliases(const char* arg, char* buffer);
481 static AliasedLoggingFlag catch_logging_aliases(const char* name, bool on);
482
483 static char* SharedArchivePath;
484 static char* SharedDynamicArchivePath;
485 static int num_archives(const char* archive_path) NOT_CDS_RETURN_(0);
486 static void extract_shared_archive_paths(const char* archive_path,
487 char** base_archive_path,
488 char** top_archive_path) NOT_CDS_RETURN;
489
490 public:
491 // Parses the arguments, first phase
492 static jint parse(const JavaVMInitArgs* args);
493 // Apply ergonomics
494 static jint apply_ergo();
495 // Adjusts the arguments after the OS have adjusted the arguments
496 static jint adjust_after_os();
497
498 // Check for consistency in the selection of the garbage collector.
499 static bool check_gc_consistency(); // Check user-selected gc
500 // Check consistency or otherwise of VM argument settings
501 static bool check_vm_args_consistency();
502 // Used by os_solaris
503 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
504
547 static bool sun_java_launcher_is_altjvm();
548
549 // -Xrun
550 static AgentLibrary* libraries() { return _libraryList.first(); }
551 static bool init_libraries_at_startup() { return !_libraryList.is_empty(); }
552 static void convert_library_to_agent(AgentLibrary* lib)
553 { _libraryList.remove(lib);
554 _agentList.add(lib); }
555
556 // -agentlib -agentpath
557 static AgentLibrary* agents() { return _agentList.first(); }
558 static bool init_agents_at_startup() { return !_agentList.is_empty(); }
559
560 // abort, exit, vfprintf hooks
561 static abort_hook_t abort_hook() { return _abort_hook; }
562 static exit_hook_t exit_hook() { return _exit_hook; }
563 static vfprintf_hook_t vfprintf_hook() { return _vfprintf_hook; }
564
565 static const char* GetSharedArchivePath() { return SharedArchivePath; }
566 static const char* GetSharedDynamicArchivePath() { return SharedDynamicArchivePath; }
567
568 // Java launcher properties
569 static void process_sun_java_launcher_properties(JavaVMInitArgs* args);
570
571 // System properties
572 static void init_system_properties();
573
574 // Update/Initialize System properties after JDK version number is known
575 static void init_version_specific_system_properties();
576
577 // Update VM info property - called after argument parsing
578 static void update_vm_info_property(const char* vm_info) {
579 _vm_info->set_value(vm_info);
580 }
581
582 // Property List manipulation
583 static void PropertyList_add(SystemProperty *element);
584 static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
585 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
586
587 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
|
465 #endif // PRODUCT
466
467 // Returns 1 if the flag is deprecated (and not yet obsolete or expired).
468 // In this case the 'version' buffer is filled in with the version number when
469 // the flag became deprecated.
470 // Returns -1 if the flag is expired or obsolete.
471 // Returns 0 otherwise.
472 static int is_deprecated_flag(const char* flag_name, JDK_Version* version);
473
474 // Return the real name for the flag passed on the command line (either an alias name or "flag_name").
475 static const char* real_flag_name(const char *flag_name);
476
477 // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
478 // Return NULL if the arg has expired.
479 static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
480 static bool lookup_logging_aliases(const char* arg, char* buffer);
481 static AliasedLoggingFlag catch_logging_aliases(const char* name, bool on);
482
483 static char* SharedArchivePath;
484 static char* SharedDynamicArchivePath;
485 static size_t _SharedBaseAddress; // The default value specified in globals.hpp
486 static int num_archives(const char* archive_path) NOT_CDS_RETURN_(0);
487 static void extract_shared_archive_paths(const char* archive_path,
488 char** base_archive_path,
489 char** top_archive_path) NOT_CDS_RETURN;
490
491 public:
492 // Parses the arguments, first phase
493 static jint parse(const JavaVMInitArgs* args);
494 // Apply ergonomics
495 static jint apply_ergo();
496 // Adjusts the arguments after the OS have adjusted the arguments
497 static jint adjust_after_os();
498
499 // Check for consistency in the selection of the garbage collector.
500 static bool check_gc_consistency(); // Check user-selected gc
501 // Check consistency or otherwise of VM argument settings
502 static bool check_vm_args_consistency();
503 // Used by os_solaris
504 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
505
548 static bool sun_java_launcher_is_altjvm();
549
550 // -Xrun
551 static AgentLibrary* libraries() { return _libraryList.first(); }
552 static bool init_libraries_at_startup() { return !_libraryList.is_empty(); }
553 static void convert_library_to_agent(AgentLibrary* lib)
554 { _libraryList.remove(lib);
555 _agentList.add(lib); }
556
557 // -agentlib -agentpath
558 static AgentLibrary* agents() { return _agentList.first(); }
559 static bool init_agents_at_startup() { return !_agentList.is_empty(); }
560
561 // abort, exit, vfprintf hooks
562 static abort_hook_t abort_hook() { return _abort_hook; }
563 static exit_hook_t exit_hook() { return _exit_hook; }
564 static vfprintf_hook_t vfprintf_hook() { return _vfprintf_hook; }
565
566 static const char* GetSharedArchivePath() { return SharedArchivePath; }
567 static const char* GetSharedDynamicArchivePath() { return SharedDynamicArchivePath; }
568 static size_t default_SharedBaseAddress() { return _SharedBaseAddress; }
569 // Java launcher properties
570 static void process_sun_java_launcher_properties(JavaVMInitArgs* args);
571
572 // System properties
573 static void init_system_properties();
574
575 // Update/Initialize System properties after JDK version number is known
576 static void init_version_specific_system_properties();
577
578 // Update VM info property - called after argument parsing
579 static void update_vm_info_property(const char* vm_info) {
580 _vm_info->set_value(vm_info);
581 }
582
583 // Property List manipulation
584 static void PropertyList_add(SystemProperty *element);
585 static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
586 static void PropertyList_add(SystemProperty** plist, const char* k, const char* v, bool writeable, bool internal);
587
588 static void PropertyList_unique_add(SystemProperty** plist, const char* k, const char* v,
|