src/share/vm/runtime/arguments.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8059557_open Sdiff src/share/vm/runtime

src/share/vm/runtime/arguments.hpp

Print this page




 311   static bool _java_compiler;
 312   static void set_java_compiler(bool arg) { _java_compiler = arg; }
 313   static bool java_compiler()   { return _java_compiler; }
 314 
 315   // -Xdebug flag
 316   static bool _xdebug_mode;
 317   static void set_xdebug_mode(bool arg) { _xdebug_mode = arg; }
 318   static bool xdebug_mode()             { return _xdebug_mode; }
 319 
 320   // Used to save default settings
 321   static bool _AlwaysCompileLoopMethods;
 322   static bool _UseOnStackReplacement;
 323   static bool _BackgroundCompilation;
 324   static bool _ClipInlining;
 325   static bool _CIDynamicCompilePriority;
 326   static intx _Tier3InvokeNotifyFreqLog;
 327   static intx _Tier4InvocationThreshold;
 328 
 329   // Tiered
 330   static void set_tiered_flags();
 331   static int  get_min_number_of_compiler_threads();
 332   // CMS/ParNew garbage collectors
 333   static void set_parnew_gc_flags();
 334   static void set_cms_and_parnew_gc_flags();
 335   // UseParallel[Old]GC
 336   static void set_parallel_gc_flags();
 337   // Garbage-First (UseG1GC)
 338   static void set_g1_gc_flags();
 339   // GC ergonomics
 340   static void set_conservative_max_heap_alignment();
 341   static void set_use_compressed_oops();
 342   static void set_use_compressed_klass_ptrs();
 343   static void select_gc();
 344   static void set_ergonomics_flags();
 345   static void set_shared_spaces_flags();
 346   // limits the given memory size by the maximum amount of memory this process is
 347   // currently allowed to allocate or reserve.
 348   static julong limit_by_allocatable_memory(julong size);
 349   // Setup heap size
 350   static void set_heap_size();
 351   // Based on automatic selection criteria, should the


 367   static void set_aggressive_opts_flags();
 368 
 369   // Argument parsing
 370   static void do_pd_flag_adjustments();
 371   static bool parse_argument(const char* arg, Flag::Flags origin);
 372   static bool process_argument(const char* arg, jboolean ignore_unrecognized, Flag::Flags origin);
 373   static void process_java_launcher_argument(const char*, void*);
 374   static void process_java_compiler_argument(char* arg);
 375   static jint parse_options_environment_variable(const char* name, SysClassPath* scp_p, bool* scp_assembly_required_p);
 376   static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
 377   static jint parse_java_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
 378   static jint parse_vm_init_args(const JavaVMInitArgs* args);
 379   static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
 380   static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
 381   static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
 382 
 383   static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
 384     return is_bad_option(option, ignore, NULL);
 385   }
 386 
 387   static bool is_percentage(uintx val) {
 388     return val <= 100;
 389   }
 390 
 391   static bool verify_interval(uintx val, uintx min,
 392                               uintx max, const char* name);
 393   static bool verify_min_value(intx val, intx min, const char* name);
 394   static bool verify_percentage(uintx value, const char* name);
 395   static void describe_range_error(ArgsRange errcode);
 396   static ArgsRange check_memory_size(julong size, julong min_size);
 397   static ArgsRange parse_memory_size(const char* s, julong* long_arg,
 398                                      julong min_size);
 399   // Parse a string for a unsigned integer.  Returns true if value
 400   // is an unsigned integer greater than or equal to the minimum
 401   // parameter passed and returns the value in uintx_arg.  Returns
 402   // false otherwise, with uintx_arg undefined.
 403   static bool parse_uintx(const char* value, uintx* uintx_arg,
 404                           uintx min_size);
 405 
 406   // methods to build strings from individual args
 407   static void build_jvm_args(const char* arg);
 408   static void build_jvm_flags(const char* arg);
 409   static void add_string(char*** bldarray, int* count, const char* arg);
 410   static const char* build_resource_string(char** args, int count);
 411 
 412   static bool methodExists(
 413     char* className, char* methodName,
 414     int classesNum, char** classes, bool* allMethods,


 430   static short  CompileOnlyClassesNum;
 431   static short  CompileOnlyClassesMax;
 432   static char** CompileOnlyClasses;
 433   static bool*  CompileOnlyAllMethods;
 434 
 435   static short  CompileOnlyMethodsNum;
 436   static short  CompileOnlyMethodsMax;
 437   static char** CompileOnlyMethods;
 438   static bool*  CompileOnlyAllClasses;
 439 
 440   static short  InterpretOnlyClassesNum;
 441   static short  InterpretOnlyClassesMax;
 442   static char** InterpretOnlyClasses;
 443   static bool*  InterpretOnlyAllMethods;
 444 
 445   static bool   CheckCompileOnly;
 446 
 447   static char*  SharedArchivePath;
 448 
 449  public:



 450   // Scale compile thresholds
 451   // Returns threshold scaled with CompileThresholdScaling
 452   static intx scaled_compile_threshold(intx threshold, double scale);
 453   static intx scaled_compile_threshold(intx threshold) {
 454     return scaled_compile_threshold(threshold, CompileThresholdScaling);
 455   }
 456   // Returns freq_log scaled with CompileThresholdScaling
 457   static intx scaled_freq_log(intx freq_log, double scale);
 458   static intx scaled_freq_log(intx freq_log) {
 459     return scaled_freq_log(freq_log, CompileThresholdScaling);
 460   }
 461 
 462   // Parses the arguments, first phase
 463   static jint parse(const JavaVMInitArgs* args);
 464   // Apply ergonomics
 465   static jint apply_ergo();
 466   // Adjusts the arguments after the OS have adjusted the arguments
 467   static jint adjust_after_os();


 468 
 469   static void set_gc_specific_flags();
 470   static inline bool gc_selected(); // whether a gc has been selected
 471   static void select_gc_ergonomically();
 472 
 473   // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
 474   // message is returned in the provided buffer.
 475   static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
 476 
 477   // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
 478   // message is returned in the provided buffer.
 479   static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
 480 
 481   // Check for consistency in the selection of the garbage collector.
 482   static bool check_gc_consistency();        // Check user-selected gc
 483   static void check_deprecated_gc_flags();
 484   // Check consistency or otherwise of VM argument settings
 485   static bool check_vm_args_consistency();
 486   // Check stack pages settings
 487   static bool check_stack_pages();
 488   // Used by os_solaris
 489   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 490 
 491   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 492   // Return the maximum size a heap with compressed oops can take
 493   static size_t max_heap_for_compressed_oops();
 494 
 495   // return a char* array containing all options
 496   static char** jvm_flags_array()          { return _jvm_flags_array; }
 497   static char** jvm_args_array()           { return _jvm_args_array; }
 498   static int num_jvm_flags()               { return _num_jvm_flags; }
 499   static int num_jvm_args()                { return _num_jvm_args; }
 500   // return the arguments passed to the Java application
 501   static const char* java_command()        { return _java_command; }
 502 
 503   // print jvm_flags, jvm_args and java_command
 504   static void print_on(outputStream* st);
 505 
 506   // convenient methods to obtain / print jvm_flags and jvm_args
 507   static const char* jvm_flags()           { return build_resource_string(_jvm_flags_array, _num_jvm_flags); }




 311   static bool _java_compiler;
 312   static void set_java_compiler(bool arg) { _java_compiler = arg; }
 313   static bool java_compiler()   { return _java_compiler; }
 314 
 315   // -Xdebug flag
 316   static bool _xdebug_mode;
 317   static void set_xdebug_mode(bool arg) { _xdebug_mode = arg; }
 318   static bool xdebug_mode()             { return _xdebug_mode; }
 319 
 320   // Used to save default settings
 321   static bool _AlwaysCompileLoopMethods;
 322   static bool _UseOnStackReplacement;
 323   static bool _BackgroundCompilation;
 324   static bool _ClipInlining;
 325   static bool _CIDynamicCompilePriority;
 326   static intx _Tier3InvokeNotifyFreqLog;
 327   static intx _Tier4InvocationThreshold;
 328 
 329   // Tiered
 330   static void set_tiered_flags();

 331   // CMS/ParNew garbage collectors
 332   static void set_parnew_gc_flags();
 333   static void set_cms_and_parnew_gc_flags();
 334   // UseParallel[Old]GC
 335   static void set_parallel_gc_flags();
 336   // Garbage-First (UseG1GC)
 337   static void set_g1_gc_flags();
 338   // GC ergonomics
 339   static void set_conservative_max_heap_alignment();
 340   static void set_use_compressed_oops();
 341   static void set_use_compressed_klass_ptrs();
 342   static void select_gc();
 343   static void set_ergonomics_flags();
 344   static void set_shared_spaces_flags();
 345   // limits the given memory size by the maximum amount of memory this process is
 346   // currently allowed to allocate or reserve.
 347   static julong limit_by_allocatable_memory(julong size);
 348   // Setup heap size
 349   static void set_heap_size();
 350   // Based on automatic selection criteria, should the


 366   static void set_aggressive_opts_flags();
 367 
 368   // Argument parsing
 369   static void do_pd_flag_adjustments();
 370   static bool parse_argument(const char* arg, Flag::Flags origin);
 371   static bool process_argument(const char* arg, jboolean ignore_unrecognized, Flag::Flags origin);
 372   static void process_java_launcher_argument(const char*, void*);
 373   static void process_java_compiler_argument(char* arg);
 374   static jint parse_options_environment_variable(const char* name, SysClassPath* scp_p, bool* scp_assembly_required_p);
 375   static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
 376   static jint parse_java_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
 377   static jint parse_vm_init_args(const JavaVMInitArgs* args);
 378   static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
 379   static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
 380   static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
 381 
 382   static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
 383     return is_bad_option(option, ignore, NULL);
 384   }
 385 








 386   static void describe_range_error(ArgsRange errcode);
 387   static ArgsRange check_memory_size(julong size, julong min_size);
 388   static ArgsRange parse_memory_size(const char* s, julong* long_arg,
 389                                      julong min_size);
 390   // Parse a string for a unsigned integer.  Returns true if value
 391   // is an unsigned integer greater than or equal to the minimum
 392   // parameter passed and returns the value in uintx_arg.  Returns
 393   // false otherwise, with uintx_arg undefined.
 394   static bool parse_uintx(const char* value, uintx* uintx_arg,
 395                           uintx min_size);
 396 
 397   // methods to build strings from individual args
 398   static void build_jvm_args(const char* arg);
 399   static void build_jvm_flags(const char* arg);
 400   static void add_string(char*** bldarray, int* count, const char* arg);
 401   static const char* build_resource_string(char** args, int count);
 402 
 403   static bool methodExists(
 404     char* className, char* methodName,
 405     int classesNum, char** classes, bool* allMethods,


 421   static short  CompileOnlyClassesNum;
 422   static short  CompileOnlyClassesMax;
 423   static char** CompileOnlyClasses;
 424   static bool*  CompileOnlyAllMethods;
 425 
 426   static short  CompileOnlyMethodsNum;
 427   static short  CompileOnlyMethodsMax;
 428   static char** CompileOnlyMethods;
 429   static bool*  CompileOnlyAllClasses;
 430 
 431   static short  InterpretOnlyClassesNum;
 432   static short  InterpretOnlyClassesMax;
 433   static char** InterpretOnlyClasses;
 434   static bool*  InterpretOnlyAllMethods;
 435 
 436   static bool   CheckCompileOnly;
 437 
 438   static char*  SharedArchivePath;
 439 
 440  public:
 441   // Tiered
 442   static int  get_min_number_of_compiler_threads();
 443   
 444   // Scale compile thresholds
 445   // Returns threshold scaled with CompileThresholdScaling
 446   static intx scaled_compile_threshold(intx threshold, double scale);
 447   static intx scaled_compile_threshold(intx threshold) {
 448     return scaled_compile_threshold(threshold, CompileThresholdScaling);
 449   }
 450   // Returns freq_log scaled with CompileThresholdScaling
 451   static intx scaled_freq_log(intx freq_log, double scale);
 452   static intx scaled_freq_log(intx freq_log) {
 453     return scaled_freq_log(freq_log, CompileThresholdScaling);
 454   }
 455 
 456   // Parses the arguments, first phase
 457   static jint parse(const JavaVMInitArgs* args);
 458   // Apply ergonomics
 459   static jint apply_ergo();
 460   // Adjusts the arguments after the OS have adjusted the arguments
 461   static jint adjust_after_os();
 462   // Set any arguments that need to be set after the final range and constraint check
 463   static void post_final_range_and_constraint_check(bool check_passed);
 464 
 465   static void set_gc_specific_flags();
 466   static inline bool gc_selected(); // whether a gc has been selected
 467   static void select_gc_ergonomically();
 468 








 469   // Check for consistency in the selection of the garbage collector.
 470   static bool check_gc_consistency();        // Check user-selected gc
 471   static void check_deprecated_gc_flags();
 472   // Check consistency or otherwise of VM argument settings
 473   static bool check_vm_args_consistency();


 474   // Used by os_solaris
 475   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 476 
 477   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 478   // Return the maximum size a heap with compressed oops can take
 479   static size_t max_heap_for_compressed_oops();
 480 
 481   // return a char* array containing all options
 482   static char** jvm_flags_array()          { return _jvm_flags_array; }
 483   static char** jvm_args_array()           { return _jvm_args_array; }
 484   static int num_jvm_flags()               { return _num_jvm_flags; }
 485   static int num_jvm_args()                { return _num_jvm_args; }
 486   // return the arguments passed to the Java application
 487   static const char* java_command()        { return _java_command; }
 488 
 489   // print jvm_flags, jvm_args and java_command
 490   static void print_on(outputStream* st);
 491 
 492   // convenient methods to obtain / print jvm_flags and jvm_args
 493   static const char* jvm_flags()           { return build_resource_string(_jvm_flags_array, _num_jvm_flags); }


src/share/vm/runtime/arguments.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File