comparison src/share/vm/runtime/arguments.hpp @ 17648:a034dc5e910b

8028391: Make the Min/MaxHeapFreeRatio flags manageable Summary: Made the flags Min- and MaxHeapFreeRatio manageable, and implemented support for these flags in ParallelGC. Reviewed-by: sla, mgerdin, brutisso
author jwilhelm
date Wed, 29 Jan 2014 23:17:05 +0100
parents 72b7e96c1922
children 78bbf4d43a14
comparison
equal deleted inserted replaced
17647:3d60c34b14ca 17648:a034dc5e910b
25 #ifndef SHARE_VM_RUNTIME_ARGUMENTS_HPP 25 #ifndef SHARE_VM_RUNTIME_ARGUMENTS_HPP
26 #define SHARE_VM_RUNTIME_ARGUMENTS_HPP 26 #define SHARE_VM_RUNTIME_ARGUMENTS_HPP
27 27
28 #include "runtime/java.hpp" 28 #include "runtime/java.hpp"
29 #include "runtime/perfData.hpp" 29 #include "runtime/perfData.hpp"
30 #include "utilities/debug.hpp"
30 #include "utilities/top.hpp" 31 #include "utilities/top.hpp"
31 32
32 // Arguments parses the command line and recognizes options 33 // Arguments parses the command line and recognizes options
33 34
34 // Invocation API hook typedefs (these should really be defined in jni.hpp) 35 // Invocation API hook typedefs (these should really be defined in jni.hpp)
368 static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p); 369 static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
369 static jint parse_java_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p); 370 static jint parse_java_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
370 static jint parse_vm_init_args(const JavaVMInitArgs* args); 371 static jint parse_vm_init_args(const JavaVMInitArgs* args);
371 static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin); 372 static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
372 static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required); 373 static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
373 static bool is_bad_option(const JavaVMOption* option, jboolean ignore, 374 static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type);
374 const char* option_type); 375
375 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { 376 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
376 return is_bad_option(option, ignore, NULL); 377 return is_bad_option(option, ignore, NULL);
377 } 378 }
379
380 static bool is_percentage(uintx val) {
381 return val <= 100;
382 }
383
378 static bool verify_interval(uintx val, uintx min, 384 static bool verify_interval(uintx val, uintx min,
379 uintx max, const char* name); 385 uintx max, const char* name);
380 static bool verify_min_value(intx val, intx min, const char* name); 386 static bool verify_min_value(intx val, intx min, const char* name);
381 static bool verify_percentage(uintx value, const char* name); 387 static bool verify_percentage(uintx value, const char* name);
382 static void describe_range_error(ArgsRange errcode); 388 static void describe_range_error(ArgsRange errcode);
438 static jint parse(const JavaVMInitArgs* args); 444 static jint parse(const JavaVMInitArgs* args);
439 // Apply ergonomics 445 // Apply ergonomics
440 static jint apply_ergo(); 446 static jint apply_ergo();
441 // Adjusts the arguments after the OS have adjusted the arguments 447 // Adjusts the arguments after the OS have adjusted the arguments
442 static jint adjust_after_os(); 448 static jint adjust_after_os();
449
450 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
451 // message is returned in the provided buffer.
452 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
453
454 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
455 // message is returned in the provided buffer.
456 static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
457
443 // Check for consistency in the selection of the garbage collector. 458 // Check for consistency in the selection of the garbage collector.
444 static bool check_gc_consistency(); 459 static bool check_gc_consistency();
445 static void check_deprecated_gcs(); 460 static void check_deprecated_gcs();
446 static void check_deprecated_gc_flags(); 461 static void check_deprecated_gc_flags();
447 // Check consistecy or otherwise of VM argument settings 462 // Check consistecy or otherwise of VM argument settings