Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 4dba97fb1a6f 1020b892787b |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
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) |
274 | 275 |
275 // java.vendor.url.bug, bug reporting URL for fatal errors. | 276 // java.vendor.url.bug, bug reporting URL for fatal errors. |
276 static const char* _java_vendor_url_bug; | 277 static const char* _java_vendor_url_bug; |
277 | 278 |
278 // sun.java.launcher, private property to provide information about | 279 // sun.java.launcher, private property to provide information about |
279 // java/gamma launcher | 280 // java launcher |
280 static const char* _sun_java_launcher; | 281 static const char* _sun_java_launcher; |
281 | 282 |
282 // sun.java.launcher.pid, private property | 283 // sun.java.launcher.pid, private property |
283 static int _sun_java_launcher_pid; | 284 static int _sun_java_launcher_pid; |
284 | 285 |
285 // was this VM created by the gamma launcher | 286 // was this VM created via the -XXaltjvm=<path> option |
286 static bool _created_by_gamma_launcher; | 287 static bool _sun_java_launcher_is_altjvm; |
287 | 288 |
288 // Option flags | 289 // Option flags |
289 static bool _has_profile; | 290 static bool _has_profile; |
290 static const char* _gc_log_filename; | 291 static const char* _gc_log_filename; |
291 // Value of the conservative maximum heap alignment needed | 292 // Value of the conservative maximum heap alignment needed |
376 static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p); | 377 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_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_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 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 jint finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_required); |
381 static bool is_bad_option(const JavaVMOption* option, jboolean ignore, | 382 static bool is_bad_option(const JavaVMOption* option, jboolean ignore, const char* option_type); |
382 const char* option_type); | 383 |
383 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { | 384 static bool is_bad_option(const JavaVMOption* option, jboolean ignore) { |
384 return is_bad_option(option, ignore, NULL); | 385 return is_bad_option(option, ignore, NULL); |
385 } | 386 } |
387 | |
388 static bool is_percentage(uintx val) { | |
389 return val <= 100; | |
390 } | |
391 | |
386 static bool verify_interval(uintx val, uintx min, | 392 static bool verify_interval(uintx val, uintx min, |
387 uintx max, const char* name); | 393 uintx max, const char* name); |
388 static bool verify_min_value(intx val, intx min, const char* name); | 394 static bool verify_min_value(intx val, intx min, const char* name); |
389 static bool verify_percentage(uintx value, const char* name); | 395 static bool verify_percentage(uintx value, const char* name); |
390 static void describe_range_error(ArgsRange errcode); | 396 static void describe_range_error(ArgsRange errcode); |
449 static jint parse(const JavaVMInitArgs* args); | 455 static jint parse(const JavaVMInitArgs* args); |
450 // Apply ergonomics | 456 // Apply ergonomics |
451 static jint apply_ergo(); | 457 static jint apply_ergo(); |
452 // Adjusts the arguments after the OS have adjusted the arguments | 458 // Adjusts the arguments after the OS have adjusted the arguments |
453 static jint adjust_after_os(); | 459 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 | |
454 // Check for consistency in the selection of the garbage collector. | 469 // Check for consistency in the selection of the garbage collector. |
455 static bool check_gc_consistency(); | 470 static bool check_gc_consistency(); |
456 static void check_deprecated_gcs(); | 471 static void check_deprecated_gcs(); |
457 static void check_deprecated_gc_flags(); | 472 static void check_deprecated_gc_flags(); |
458 // Check consistecy or otherwise of VM argument settings | 473 // Check consistency or otherwise of VM argument settings |
459 static bool check_vm_args_consistency(); | 474 static bool check_vm_args_consistency(); |
460 // Check stack pages settings | 475 // Check stack pages settings |
461 static bool check_stack_pages(); | 476 static bool check_stack_pages(); |
462 // Used by os_solaris | 477 // Used by os_solaris |
463 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized); | 478 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized); |
496 | 511 |
497 // -Dsun.java.launcher | 512 // -Dsun.java.launcher |
498 static const char* sun_java_launcher() { return _sun_java_launcher; } | 513 static const char* sun_java_launcher() { return _sun_java_launcher; } |
499 // Was VM created by a Java launcher? | 514 // Was VM created by a Java launcher? |
500 static bool created_by_java_launcher(); | 515 static bool created_by_java_launcher(); |
501 // Was VM created by the gamma Java launcher? | 516 // -Dsun.java.launcher.is_altjvm |
502 static bool created_by_gamma_launcher(); | 517 static bool sun_java_launcher_is_altjvm(); |
503 // -Dsun.java.launcher.pid | 518 // -Dsun.java.launcher.pid |
504 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; } | 519 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; } |
505 | 520 |
506 // -Xloggc:<file>, if not specified will be NULL | 521 // -Xloggc:<file>, if not specified will be NULL |
507 static const char* gc_log_filename() { return _gc_log_filename; } | 522 static const char* gc_log_filename() { return _gc_log_filename; } |
508 | 523 |
509 // -Xprof | 524 // -Xprof |
510 static bool has_profile() { return _has_profile; } | 525 static bool has_profile() { return _has_profile; } |
511 | 526 |
512 // -Xms, -Xmx | 527 // -Xms |
513 static uintx min_heap_size() { return _min_heap_size; } | 528 static uintx min_heap_size() { return _min_heap_size; } |
514 static void set_min_heap_size(uintx v) { _min_heap_size = v; } | 529 static void set_min_heap_size(uintx v) { _min_heap_size = v; } |
515 | 530 |
516 // -Xrun | 531 // -Xrun |
517 static AgentLibrary* libraries() { return _libraryList.first(); } | 532 static AgentLibrary* libraries() { return _libraryList.first(); } |