comparison src/share/vm/runtime/arguments.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents d8041d695d19
children 289a017dd9e2
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
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"
31 #include "utilities/top.hpp" 30 #include "utilities/top.hpp"
32 31
33 // Arguments parses the command line and recognizes options 32 // Arguments parses the command line and recognizes options
34 33
35 // Invocation API hook typedefs (these should really be defined in jni.hpp) 34 // Invocation API hook typedefs (these should really be defined in jni.hpp)
275 274
276 // java.vendor.url.bug, bug reporting URL for fatal errors. 275 // java.vendor.url.bug, bug reporting URL for fatal errors.
277 static const char* _java_vendor_url_bug; 276 static const char* _java_vendor_url_bug;
278 277
279 // sun.java.launcher, private property to provide information about 278 // sun.java.launcher, private property to provide information about
280 // java launcher 279 // java/gamma launcher
281 static const char* _sun_java_launcher; 280 static const char* _sun_java_launcher;
282 281
283 // sun.java.launcher.pid, private property 282 // sun.java.launcher.pid, private property
284 static int _sun_java_launcher_pid; 283 static int _sun_java_launcher_pid;
285 284
286 // was this VM created via the -XXaltjvm=<path> option 285 // was this VM created by the gamma launcher
287 static bool _sun_java_launcher_is_altjvm; 286 static bool _created_by_gamma_launcher;
288 287
289 // Option flags 288 // Option flags
290 static bool _has_profile; 289 static bool _has_profile;
291 static const char* _gc_log_filename; 290 static const char* _gc_log_filename;
292 // Value of the conservative maximum heap alignment needed 291 // Value of the conservative maximum heap alignment needed
377 static jint parse_java_tool_options_environment_variable(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);
378 static jint parse_java_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);
379 static jint parse_vm_init_args(const JavaVMInitArgs* args); 378 static jint parse_vm_init_args(const JavaVMInitArgs* args);
380 static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin); 379 static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, Flag::Flags origin);
381 static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required); 380 static jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required);
382 static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type); 381 static bool is_bad_option(const JavaVMOption* option, jboolean ignore,
383 382 const char* option_type);
384 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { 383 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) {
385 return is_bad_option(option, ignore, NULL); 384 return is_bad_option(option, ignore, NULL);
386 } 385 }
387
388 static bool is_percentage(uintx val) {
389 return val <= 100;
390 }
391
392 static bool verify_interval(uintx val, uintx min, 386 static bool verify_interval(uintx val, uintx min,
393 uintx max, const char* name); 387 uintx max, const char* name);
394 static bool verify_min_value(intx val, intx min, const char* name); 388 static bool verify_min_value(intx val, intx min, const char* name);
395 static bool verify_percentage(uintx value, const char* name); 389 static bool verify_percentage(uintx value, const char* name);
396 static void describe_range_error(ArgsRange errcode); 390 static void describe_range_error(ArgsRange errcode);
455 static jint parse(const JavaVMInitArgs* args); 449 static jint parse(const JavaVMInitArgs* args);
456 // Apply ergonomics 450 // Apply ergonomics
457 static jint apply_ergo(); 451 static jint apply_ergo();
458 // Adjusts the arguments after the OS have adjusted the arguments 452 // Adjusts the arguments after the OS have adjusted the arguments
459 static jint adjust_after_os(); 453 static jint adjust_after_os();
460
461 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
462 // message is returned in the provided buffer.
463 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
464
465 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
466 // message is returned in the provided buffer.
467 static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
468
469 // Check for consistency in the selection of the garbage collector. 454 // Check for consistency in the selection of the garbage collector.
470 static bool check_gc_consistency(); 455 static bool check_gc_consistency();
471 static void check_deprecated_gcs(); 456 static void check_deprecated_gcs();
472 static void check_deprecated_gc_flags(); 457 static void check_deprecated_gc_flags();
473 // Check consistency or otherwise of VM argument settings 458 // Check consistecy or otherwise of VM argument settings
474 static bool check_vm_args_consistency(); 459 static bool check_vm_args_consistency();
475 // Check stack pages settings 460 // Check stack pages settings
476 static bool check_stack_pages(); 461 static bool check_stack_pages();
477 // Used by os_solaris 462 // Used by os_solaris
478 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized); 463 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
511 496
512 // -Dsun.java.launcher 497 // -Dsun.java.launcher
513 static const char* sun_java_launcher() { return _sun_java_launcher; } 498 static const char* sun_java_launcher() { return _sun_java_launcher; }
514 // Was VM created by a Java launcher? 499 // Was VM created by a Java launcher?
515 static bool created_by_java_launcher(); 500 static bool created_by_java_launcher();
516 // -Dsun.java.launcher.is_altjvm 501 // Was VM created by the gamma Java launcher?
517 static bool sun_java_launcher_is_altjvm(); 502 static bool created_by_gamma_launcher();
518 // -Dsun.java.launcher.pid 503 // -Dsun.java.launcher.pid
519 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; } 504 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; }
520 505
521 // -Xloggc:<file>, if not specified will be NULL 506 // -Xloggc:<file>, if not specified will be NULL
522 static const char* gc_log_filename() { return _gc_log_filename; } 507 static const char* gc_log_filename() { return _gc_log_filename; }
523 508
524 // -Xprof 509 // -Xprof
525 static bool has_profile() { return _has_profile; } 510 static bool has_profile() { return _has_profile; }
526 511
527 // -Xms 512 // -Xms, -Xmx
528 static uintx min_heap_size() { return _min_heap_size; } 513 static uintx min_heap_size() { return _min_heap_size; }
529 static void set_min_heap_size(uintx v) { _min_heap_size = v; } 514 static void set_min_heap_size(uintx v) { _min_heap_size = v; }
530 515
531 // -Xrun 516 // -Xrun
532 static AgentLibrary* libraries() { return _libraryList.first(); } 517 static AgentLibrary* libraries() { return _libraryList.first(); }