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
|
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* 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 the flag became
437 // deprecated so that that value can be displayed to the user.
438 // Returns -1 if the flag is deprecated and 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 // Support option aliases.
443 // Return the real name for the flag passed on the command line.
444 static const char* real_flag_name(const char *flag_name);
445
446 // return the "real" name for option arg, and print warnings if arg is deprecated.
447 static const char* handle_aliases_and_deprecation(const char* arg);
448
449 static short CompileOnlyClassesNum;
450 static short CompileOnlyClassesMax;
451 static char** CompileOnlyClasses;
452 static bool* CompileOnlyAllMethods;
453
454 static short CompileOnlyMethodsNum;
455 static short CompileOnlyMethodsMax;
456 static char** CompileOnlyMethods;
457 static bool* CompileOnlyAllClasses;
458
459 static short InterpretOnlyClassesNum;
460 static short InterpretOnlyClassesMax;
461 static char** InterpretOnlyClasses;
462 static bool* InterpretOnlyAllMethods;
463
464 static bool CheckCompileOnly;
465
466 static char* SharedArchivePath;
467
471 // Apply ergonomics
472 static jint apply_ergo();
473 // Adjusts the arguments after the OS have adjusted the arguments
474 static jint adjust_after_os();
475
476 static void set_gc_specific_flags();
477 static inline bool gc_selected(); // whether a gc has been selected
478 static void select_gc_ergonomically();
479
480 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error
481 // message is returned in the provided buffer.
482 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio);
483
484 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error
485 // message is returned in the provided buffer.
486 static bool verify_MaxHeapFreeRatio(FormatBuffer<80>& err_msg, uintx max_heap_free_ratio);
487
488 // Check for consistency in the selection of the garbage collector.
489 static bool check_gc_consistency_user(); // Check user-selected gc
490 static inline bool check_gc_consistency_ergo(); // Check ergonomic-selected gc
491 // Check consistency or otherwise of VM argument settings
492 static bool check_vm_args_consistency();
493 // Check stack pages settings
494 static bool check_stack_pages();
495 // Used by os_solaris
496 static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
497
498 static size_t conservative_max_heap_alignment() { return _conservative_max_heap_alignment; }
499 // Return the maximum size a heap with compressed oops can take
500 static size_t max_heap_for_compressed_oops();
501
502 // return a char* array containing all options
503 static char** jvm_flags_array() { return _jvm_flags_array; }
504 static char** jvm_args_array() { return _jvm_args_array; }
505 static int num_jvm_flags() { return _num_jvm_flags; }
506 static int num_jvm_args() { return _num_jvm_args; }
507 // return the arguments passed to the Java application
508 static const char* java_command() { return _java_command; }
509
510 // print jvm_flags, jvm_args and java_command
|