< prev index next >

src/share/vm/runtime/arguments.hpp

Print this page




 491   // Scale compile thresholds
 492   // Returns threshold scaled with CompileThresholdScaling
 493   static intx scaled_compile_threshold(intx threshold, double scale);
 494   static intx scaled_compile_threshold(intx threshold) {
 495     return scaled_compile_threshold(threshold, CompileThresholdScaling);
 496   }
 497   // Returns freq_log scaled with CompileThresholdScaling
 498   static intx scaled_freq_log(intx freq_log, double scale);
 499   static intx scaled_freq_log(intx freq_log) {
 500     return scaled_freq_log(freq_log, CompileThresholdScaling);
 501   }
 502 
 503   // Parses the arguments, first phase
 504   static jint parse(const JavaVMInitArgs* args);
 505   // Apply ergonomics
 506   static jint apply_ergo();
 507   // Adjusts the arguments after the OS have adjusted the arguments
 508   static jint adjust_after_os();
 509 
 510   static void set_gc_specific_flags();
 511   static inline bool gc_selected(); // whether a gc has been selected
 512   static void select_gc_ergonomically();
 513 #if INCLUDE_JVMCI
 514   // Check consistency of jvmci vm argument settings.
 515   static bool check_jvmci_args_consistency();
 516 #endif
 517   // Check for consistency in the selection of the garbage collector.
 518   static bool check_gc_consistency();        // Check user-selected gc
 519   // Check consistency or otherwise of VM argument settings
 520   static bool check_vm_args_consistency();
 521   // Used by os_solaris
 522   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 523 
 524   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 525   // Return the maximum size a heap with compressed oops can take
 526   static size_t max_heap_for_compressed_oops();
 527 
 528   // return a char* array containing all options
 529   static char** jvm_flags_array()          { return _jvm_flags_array; }
 530   static char** jvm_args_array()           { return _jvm_args_array; }
 531   static int num_jvm_flags()               { return _num_jvm_flags; }


 632   static void set_ext_dirs(char *value)     { _ext_dirs = os::strdup_check_oom(value); }
 633   static void set_sysclasspath(const char *value) { _sun_boot_class_path->set_value(value); }
 634   static void append_sysclasspath(const char *value) { _sun_boot_class_path->append_value(value); }
 635 
 636   static char* get_java_home() { return _java_home->value(); }
 637   static char* get_dll_dir() { return _sun_boot_library_path->value(); }
 638   static char* get_sysclasspath() { return _sun_boot_class_path->value(); }
 639   static char* get_ext_dirs()        { return _ext_dirs;  }
 640   static char* get_appclasspath() { return _java_class_path->value(); }
 641   static void  fix_appclasspath();
 642 
 643 
 644   // Operation modi
 645   static Mode mode()                { return _mode; }
 646   static bool is_interpreter_only() { return mode() == _int; }
 647 
 648 
 649   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 650   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 651 };
 652 
 653 bool Arguments::gc_selected() {
 654   return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC || UseSerialGC;
 655 }
 656 
 657 // Disable options not supported in this release, with a warning if they
 658 // were explicitly requested on the command-line
 659 #define UNSUPPORTED_OPTION(opt, description)                    \
 660 do {                                                            \
 661   if (opt) {                                                    \
 662     if (FLAG_IS_CMDLINE(opt)) {                                 \
 663       warning(description " is disabled in this release.");     \
 664     }                                                           \
 665     FLAG_SET_DEFAULT(opt, false);                               \
 666   }                                                             \
 667 } while(0)
 668 
 669 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP


 491   // Scale compile thresholds
 492   // Returns threshold scaled with CompileThresholdScaling
 493   static intx scaled_compile_threshold(intx threshold, double scale);
 494   static intx scaled_compile_threshold(intx threshold) {
 495     return scaled_compile_threshold(threshold, CompileThresholdScaling);
 496   }
 497   // Returns freq_log scaled with CompileThresholdScaling
 498   static intx scaled_freq_log(intx freq_log, double scale);
 499   static intx scaled_freq_log(intx freq_log) {
 500     return scaled_freq_log(freq_log, CompileThresholdScaling);
 501   }
 502 
 503   // Parses the arguments, first phase
 504   static jint parse(const JavaVMInitArgs* args);
 505   // Apply ergonomics
 506   static jint apply_ergo();
 507   // Adjusts the arguments after the OS have adjusted the arguments
 508   static jint adjust_after_os();
 509 
 510   static void set_gc_specific_flags();
 511   static bool gc_selected(); // whether a gc has been selected
 512   static void select_gc_ergonomically();
 513 #if INCLUDE_JVMCI
 514   // Check consistency of jvmci vm argument settings.
 515   static bool check_jvmci_args_consistency();
 516 #endif
 517   // Check for consistency in the selection of the garbage collector.
 518   static bool check_gc_consistency();        // Check user-selected gc
 519   // Check consistency or otherwise of VM argument settings
 520   static bool check_vm_args_consistency();
 521   // Used by os_solaris
 522   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 523 
 524   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 525   // Return the maximum size a heap with compressed oops can take
 526   static size_t max_heap_for_compressed_oops();
 527 
 528   // return a char* array containing all options
 529   static char** jvm_flags_array()          { return _jvm_flags_array; }
 530   static char** jvm_args_array()           { return _jvm_args_array; }
 531   static int num_jvm_flags()               { return _num_jvm_flags; }


 632   static void set_ext_dirs(char *value)     { _ext_dirs = os::strdup_check_oom(value); }
 633   static void set_sysclasspath(const char *value) { _sun_boot_class_path->set_value(value); }
 634   static void append_sysclasspath(const char *value) { _sun_boot_class_path->append_value(value); }
 635 
 636   static char* get_java_home() { return _java_home->value(); }
 637   static char* get_dll_dir() { return _sun_boot_library_path->value(); }
 638   static char* get_sysclasspath() { return _sun_boot_class_path->value(); }
 639   static char* get_ext_dirs()        { return _ext_dirs;  }
 640   static char* get_appclasspath() { return _java_class_path->value(); }
 641   static void  fix_appclasspath();
 642 
 643 
 644   // Operation modi
 645   static Mode mode()                { return _mode; }
 646   static bool is_interpreter_only() { return mode() == _int; }
 647 
 648 
 649   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 650   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 651 };




 652 
 653 // Disable options not supported in this release, with a warning if they
 654 // were explicitly requested on the command-line
 655 #define UNSUPPORTED_OPTION(opt, description)                    \
 656 do {                                                            \
 657   if (opt) {                                                    \
 658     if (FLAG_IS_CMDLINE(opt)) {                                 \
 659       warning(description " is disabled in this release.");     \
 660     }                                                           \
 661     FLAG_SET_DEFAULT(opt, false);                               \
 662   }                                                             \
 663 } while(0)
 664 
 665 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
< prev index next >