409 uintx min_size);
410
411 // methods to build strings from individual args
412 static void build_jvm_args(const char* arg);
413 static void build_jvm_flags(const char* arg);
414 static void add_string(char*** bldarray, int* count, const char* arg);
415 static const char* build_resource_string(char** args, int count);
416
417 static bool methodExists(
418 char* className, char* methodName,
419 int classesNum, char** classes, bool* allMethods,
420 int methodsNum, char** methods, bool* allClasses
421 );
422
423 static void parseOnlyLine(
424 const char* line,
425 short* classesNum, short* classesMax, char*** classes, bool** allMethods,
426 short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
427 );
428
429 // Returns true if the string s is in the list of flags that have recently
430 // been made obsolete. If we detect one of these flags on the command
431 // line, instead of failing we print a warning message and ignore the
432 // flag. This gives the user a release or so to stop using the flag.
433 static bool is_newly_obsolete(const char* s, JDK_Version* buffer);
434
435 static short CompileOnlyClassesNum;
436 static short CompileOnlyClassesMax;
437 static char** CompileOnlyClasses;
438 static bool* CompileOnlyAllMethods;
439
440 static short CompileOnlyMethodsNum;
441 static short CompileOnlyMethodsMax;
442 static char** CompileOnlyMethods;
443 static bool* CompileOnlyAllClasses;
444
445 static short InterpretOnlyClassesNum;
446 static short InterpretOnlyClassesMax;
447 static char** InterpretOnlyClasses;
448 static bool* InterpretOnlyAllMethods;
449
450 static bool CheckCompileOnly;
451
452 static char* SharedArchivePath;
453
457 // Apply ergonomics
458 static jint apply_ergo();
459 // Adjusts the arguments after the OS have adjusted the arguments
460 static jint adjust_after_os();
461
462 static void set_gc_specific_flags();
463 static inline bool gc_selected(); // whether a gc has been selected
464 static void select_gc_ergonomically();
465
466 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
467 // message is returned in the provided buffer.
468 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
469
470 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
471 // message is returned in the provided buffer.
472 static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
473
474 // Check for consistency in the selection of the garbage collector.
475 static bool check_gc_consistency_user(); // Check user-selected gc
476 static inline bool check_gc_consistency_ergo(); // Check ergonomic-selected gc
477 static void check_deprecated_gc_flags();
478 // Check consistency or otherwise of VM argument settings
479 static bool check_vm_args_consistency();
480 // Check stack pages settings
481 static bool check_stack_pages();
482 // Used by os_solaris
483 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
484
485 static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
486 // Return the maximum size a heap with compressed oops can take
487 static size_t max_heap_for_compressed_oops();
488
489 // return a char* array containing all options
490 static char** jvm_flags_array() { return _jvm_flags_array; }
491 static char** jvm_args_array() { return _jvm_args_array; }
492 static int num_jvm_flags() { return _num_jvm_flags; }
493 static int num_jvm_args() { return _num_jvm_args; }
494 // return the arguments passed to the Java application
495 static const char* java_command() { return _java_command; }
496
497 // print jvm_flags, jvm_args and java_command
|
409 uintx min_size);
410
411 // methods to build strings from individual args
412 static void build_jvm_args(const char* arg);
413 static void build_jvm_flags(const char* arg);
414 static void add_string(char*** bldarray, int* count, const char* arg);
415 static const char* build_resource_string(char** args, int count);
416
417 static bool methodExists(
418 char* className, char* methodName,
419 int classesNum, char** classes, bool* allMethods,
420 int methodsNum, char** methods, bool* allClasses
421 );
422
423 static void parseOnlyLine(
424 const char* line,
425 short* classesNum, short* classesMax, char*** classes, bool** allMethods,
426 short* methodsNum, short* methodsMax, char*** methods, bool** allClasses
427 );
428
429 // Returns true if the flag is obsolete and fits into the range specified
430 // for being ignored. In the case the 'version' buffer is filled in with
431 // the version number when the flag became obsolete. Otherwise the flag has
432 // expired and should be ignored.
433 static bool is_newly_obsolete(const char* s, JDK_Version* version);
434
435 // Returns 1 if the flag is deprecated and jdk version is in the range specified.
436 // In this case the 'version' buffer is filled in with the version number when
437 // the flag became deprecated.
438 // Returns -1 if the flag is deprecated and has expired (should be ignored).
439 // Returns 0 if the flag is not deprecated.
440 static int is_deprecated_flag(const char* s, JDK_Version* version);
441
442 // Return the real name for the flag passed on the command line.
443 static const char* real_flag_name(const char *flag_name);
444
445 // Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
446 static const char* handle_aliases_and_deprecation(const char* arg);
447
448 static short CompileOnlyClassesNum;
449 static short CompileOnlyClassesMax;
450 static char** CompileOnlyClasses;
451 static bool* CompileOnlyAllMethods;
452
453 static short CompileOnlyMethodsNum;
454 static short CompileOnlyMethodsMax;
455 static char** CompileOnlyMethods;
456 static bool* CompileOnlyAllClasses;
457
458 static short InterpretOnlyClassesNum;
459 static short InterpretOnlyClassesMax;
460 static char** InterpretOnlyClasses;
461 static bool* InterpretOnlyAllMethods;
462
463 static bool CheckCompileOnly;
464
465 static char* SharedArchivePath;
466
470 // Apply ergonomics
471 static jint apply_ergo();
472 // Adjusts the arguments after the OS have adjusted the arguments
473 static jint adjust_after_os();
474
475 static void set_gc_specific_flags();
476 static inline bool gc_selected(); // whether a gc has been selected
477 static void select_gc_ergonomically();
478
479 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
480 // message is returned in the provided buffer.
481 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
482
483 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
484 // message is returned in the provided buffer.
485 static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
486
487 // Check for consistency in the selection of the garbage collector.
488 static bool check_gc_consistency_user(); // Check user-selected gc
489 static inline bool check_gc_consistency_ergo(); // Check ergonomic-selected gc
490 // Check consistency or otherwise of VM argument settings
491 static bool check_vm_args_consistency();
492 // Check stack pages settings
493 static bool check_stack_pages();
494 // Used by os_solaris
495 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
496
497 static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
498 // Return the maximum size a heap with compressed oops can take
499 static size_t max_heap_for_compressed_oops();
500
501 // return a char* array containing all options
502 static char** jvm_flags_array() { return _jvm_flags_array; }
503 static char** jvm_args_array() { return _jvm_args_array; }
504 static int num_jvm_flags() { return _num_jvm_flags; }
505 static int num_jvm_args() { return _num_jvm_args; }
506 // return the arguments passed to the Java application
507 static const char* java_command() { return _java_command; }
508
509 // print jvm_flags, jvm_args and java_command
|