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