< prev index next >

src/share/vm/runtime/arguments.hpp

Print this page




 353   // Set up runtime image flags
 354   static void set_runtime_image_flags();
 355   // Based on automatic selection criteria, should the
 356   // low pause collector be used.
 357   static bool should_auto_select_low_pause_collector();
 358 
 359   // Bytecode rewriting
 360   static void set_bytecode_flags();
 361 
 362   // Invocation API hooks
 363   static abort_hook_t     _abort_hook;
 364   static exit_hook_t      _exit_hook;
 365   static vfprintf_hook_t  _vfprintf_hook;
 366 
 367   // System properties
 368   static bool add_property(const char* prop);
 369 
 370   // Aggressive optimization flags.
 371   static void set_aggressive_opts_flags();
 372 


 373   // Argument parsing
 374   static void do_pd_flag_adjustments();
 375   static bool parse_argument(const char* arg, Flag::Flags origin);
 376   static bool process_argument(const char* arg, jboolean ignore_unrecognized, Flag::Flags origin);
 377   static void process_java_launcher_argument(const char*, void*);
 378   static void process_java_compiler_argument(char* arg);
 379   static jint parse_options_environment_variable(const char* name, ScopedVMInitArgs* vm_args);
 380   static jint parse_java_tool_options_environment_variable(ScopedVMInitArgs* vm_args);
 381   static jint parse_java_options_environment_variable(ScopedVMInitArgs* vm_args);
 382   static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args,
 383                                  const JavaVMInitArgs *java_options_args,
 384                                  const JavaVMInitArgs *cmd_line_args);
 385   static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
 386   static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
 387   static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
 388 
 389   static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
 390     return is_bad_option(option, ignore, NULL);
 391   }
 392 


 402                           uintx min_size);
 403 
 404   // methods to build strings from individual args
 405   static void build_jvm_args(const char* arg);
 406   static void build_jvm_flags(const char* arg);
 407   static void add_string(char*** bldarray, int* count, const char* arg);
 408   static const char* build_resource_string(char** args, int count);
 409 
 410   static bool methodExists(
 411     char* className, char* methodName,
 412     int classesNum, char** classes, bool* allMethods,
 413     int methodsNum, char** methods, bool* allClasses
 414   );
 415 
 416   static void parseOnlyLine(
 417     const char* line,
 418     short* classesNum, short* classesMax, char*** classes, bool** allMethods,
 419     short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
 420   );
 421 
 422   // Returns true if the string s is in the list of flags that have recently
 423   // been made obsolete.  If we detect one of these flags on the command
 424   // line, instead of failing we print a warning message and ignore the
 425   // flag.  This gives the user a release or so to stop using the flag.
 426   static bool is_newly_obsolete(const char* s, JDK_Version* buffer);













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


 455   static intx scaled_freq_log(intx freq_log, double scale);
 456   static intx scaled_freq_log(intx freq_log) {
 457     return scaled_freq_log(freq_log, CompileThresholdScaling);
 458   }
 459 
 460   // Parses the arguments, first phase
 461   static jint parse(const JavaVMInitArgs* args);
 462   // Apply ergonomics
 463   static jint apply_ergo();
 464   // Adjusts the arguments after the OS have adjusted the arguments
 465   static jint adjust_after_os();
 466   // Set any arguments that need to be set after the 'CommandLineFlagConstraint::AfterErgo' constraint check
 467   static void post_after_ergo_constraint_check(bool check_passed);
 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   // Check for consistency in the selection of the garbage collector.
 474   static bool check_gc_consistency();        // Check user-selected gc
 475   static void check_deprecated_gc_flags();
 476   // Check consistency or otherwise of VM argument settings
 477   static bool check_vm_args_consistency();
 478   // Used by os_solaris
 479   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 480 
 481   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 482   // Return the maximum size a heap with compressed oops can take
 483   static size_t max_heap_for_compressed_oops();
 484 
 485   // return a char* array containing all options
 486   static char** jvm_flags_array()          { return _jvm_flags_array; }
 487   static char** jvm_args_array()           { return _jvm_args_array; }
 488   static int num_jvm_flags()               { return _num_jvm_flags; }
 489   static int num_jvm_args()                { return _num_jvm_args; }
 490   // return the arguments passed to the Java application
 491   static const char* java_command()        { return _java_command; }
 492 
 493   // print jvm_flags, jvm_args and java_command
 494   static void print_on(outputStream* st);
 495   static void print_summary_on(outputStream* st);




 353   // Set up runtime image flags
 354   static void set_runtime_image_flags();
 355   // Based on automatic selection criteria, should the
 356   // low pause collector be used.
 357   static bool should_auto_select_low_pause_collector();
 358 
 359   // Bytecode rewriting
 360   static void set_bytecode_flags();
 361 
 362   // Invocation API hooks
 363   static abort_hook_t     _abort_hook;
 364   static exit_hook_t      _exit_hook;
 365   static vfprintf_hook_t  _vfprintf_hook;
 366 
 367   // System properties
 368   static bool add_property(const char* prop);
 369 
 370   // Aggressive optimization flags.
 371   static void set_aggressive_opts_flags();
 372 
 373   static jint set_aggressive_heap_flags();
 374 
 375   // Argument parsing
 376   static void do_pd_flag_adjustments();
 377   static bool parse_argument(const char* arg, Flag::Flags origin);
 378   static bool process_argument(const char* arg, jboolean ignore_unrecognized, Flag::Flags origin);
 379   static void process_java_launcher_argument(const char*, void*);
 380   static void process_java_compiler_argument(char* arg);
 381   static jint parse_options_environment_variable(const char* name, ScopedVMInitArgs* vm_args);
 382   static jint parse_java_tool_options_environment_variable(ScopedVMInitArgs* vm_args);
 383   static jint parse_java_options_environment_variable(ScopedVMInitArgs* vm_args);
 384   static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args,
 385                                  const JavaVMInitArgs *java_options_args,
 386                                  const JavaVMInitArgs *cmd_line_args);
 387   static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
 388   static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
 389   static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
 390 
 391   static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
 392     return is_bad_option(option, ignore, NULL);
 393   }
 394 


 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,
 415     int methodsNum, char** methods, bool* allClasses
 416   );
 417 
 418   static void parseOnlyLine(
 419     const char* line,
 420     short* classesNum, short* classesMax, char*** classes, bool** allMethods,
 421     short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
 422   );
 423 
 424   // Returns true if the flag is obsolete and fits into the range specified
 425   // for being ignored.  In the case the 'version' buffer is filled in with 
 426   // the version number when the flag became obsolete.
 427   static bool is_obsolete_flag(const char* flag_name, JDK_Version* version);
 428 
 429   // Returns 1 if the flag is deprecated and jdk version is in the range specified.
 430   //     In this case the 'version' buffer is filled in with the version number when 
 431   //     the flag became deprecated.
 432   // Returns -1 if the flag is deprecated and has expired (should be ignored).
 433   // Returns 0 if the flag is not deprecated.
 434   static int is_deprecated_flag(const char* flag_name, JDK_Version* version);
 435 
 436   // Return the real name for the flag passed on the command line (either an alias name or "flag_name").
 437   static const char* real_flag_name(const char *flag_name);
 438 
 439   // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
 440   // Return NULL if the arg has expired.
 441   static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
 442 
 443   static short  CompileOnlyClassesNum;
 444   static short  CompileOnlyClassesMax;
 445   static char** CompileOnlyClasses;
 446   static bool*  CompileOnlyAllMethods;
 447 
 448   static short  CompileOnlyMethodsNum;
 449   static short  CompileOnlyMethodsMax;
 450   static char** CompileOnlyMethods;
 451   static bool*  CompileOnlyAllClasses;
 452 
 453   static short  InterpretOnlyClassesNum;
 454   static short  InterpretOnlyClassesMax;
 455   static char** InterpretOnlyClasses;
 456   static bool*  InterpretOnlyAllMethods;
 457 
 458   static bool   CheckCompileOnly;
 459 
 460   static char*  SharedArchivePath;
 461 


 470   static intx scaled_freq_log(intx freq_log, double scale);
 471   static intx scaled_freq_log(intx freq_log) {
 472     return scaled_freq_log(freq_log, CompileThresholdScaling);
 473   }
 474 
 475   // Parses the arguments, first phase
 476   static jint parse(const JavaVMInitArgs* args);
 477   // Apply ergonomics
 478   static jint apply_ergo();
 479   // Adjusts the arguments after the OS have adjusted the arguments
 480   static jint adjust_after_os();
 481   // Set any arguments that need to be set after the 'CommandLineFlagConstraint::AfterErgo' constraint check
 482   static void post_after_ergo_constraint_check(bool check_passed);
 483 
 484   static void set_gc_specific_flags();
 485   static inline bool gc_selected(); // whether a gc has been selected
 486   static void select_gc_ergonomically();
 487 
 488   // Check for consistency in the selection of the garbage collector.
 489   static bool check_gc_consistency();        // Check user-selected gc

 490   // Check consistency or otherwise of VM argument settings
 491   static bool check_vm_args_consistency();
 492   // Used by os_solaris
 493   static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
 494 
 495   static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
 496   // Return the maximum size a heap with compressed oops can take
 497   static size_t max_heap_for_compressed_oops();
 498 
 499   // return a char* array containing all options
 500   static char** jvm_flags_array()          { return _jvm_flags_array; }
 501   static char** jvm_args_array()           { return _jvm_args_array; }
 502   static int num_jvm_flags()               { return _num_jvm_flags; }
 503   static int num_jvm_args()                { return _num_jvm_args; }
 504   // return the arguments passed to the Java application
 505   static const char* java_command()        { return _java_command; }
 506 
 507   // print jvm_flags, jvm_args and java_command
 508   static void print_on(outputStream* st);
 509   static void print_summary_on(outputStream* st);


< prev index next >