242 arg_in_range = 0 |
242 arg_in_range = 0 |
243 }; |
243 }; |
244 |
244 |
245 private: |
245 private: |
246 |
246 |
|
247 // a pointer to the flags file name if it is specified |
|
248 static char* _jvm_flags_file; |
247 // an array containing all flags specified in the .hotspotrc file |
249 // an array containing all flags specified in the .hotspotrc file |
248 static char** _jvm_flags_array; |
250 static char** _jvm_flags_array; |
249 static int _num_jvm_flags; |
251 static int _num_jvm_flags; |
250 // an array containing all jvm arguments specified in the command line |
252 // an array containing all jvm arguments specified in the command line |
251 static char** _jvm_args_array; |
253 static char** _jvm_args_array; |
376 static jint parse_java_tool_options_environment_variable(ScopedVMInitArgs* vm_args); |
378 static jint parse_java_tool_options_environment_variable(ScopedVMInitArgs* vm_args); |
377 static jint parse_java_options_environment_variable(ScopedVMInitArgs* vm_args); |
379 static jint parse_java_options_environment_variable(ScopedVMInitArgs* vm_args); |
378 static jint parse_vm_options_file(const char* file_name, ScopedVMInitArgs* vm_args); |
380 static jint parse_vm_options_file(const char* file_name, ScopedVMInitArgs* vm_args); |
379 static jint parse_options_buffer(const char* name, char* buffer, const size_t buf_len, ScopedVMInitArgs* vm_args); |
381 static jint parse_options_buffer(const char* name, char* buffer, const size_t buf_len, ScopedVMInitArgs* vm_args); |
380 static jint insert_vm_options_file(const JavaVMInitArgs* args, |
382 static jint insert_vm_options_file(const JavaVMInitArgs* args, |
381 char** flags_file, |
|
382 char** vm_options_file, |
383 char** vm_options_file, |
383 const int vm_options_file_pos, |
384 const int vm_options_file_pos, |
384 ScopedVMInitArgs* vm_options_file_args, |
385 ScopedVMInitArgs* vm_options_file_args, |
385 ScopedVMInitArgs* args_out); |
386 ScopedVMInitArgs* args_out); |
386 static jint match_special_option_and_act(const JavaVMInitArgs* args, |
387 static jint match_special_option_and_act(const JavaVMInitArgs* args, |
387 char** flags_file, |
|
388 char** vm_options_file, |
388 char** vm_options_file, |
389 ScopedVMInitArgs* vm_options_file_args, |
|
390 ScopedVMInitArgs* args_out); |
389 ScopedVMInitArgs* args_out); |
391 |
390 |
392 static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args, |
391 static jint parse_vm_init_args(const JavaVMInitArgs *java_tool_options_args, |
393 const JavaVMInitArgs *java_options_args, |
392 const JavaVMInitArgs *java_options_args, |
394 const JavaVMInitArgs *cmd_line_args); |
393 const JavaVMInitArgs *cmd_line_args); |
512 |
511 |
513 // print jvm_flags, jvm_args and java_command |
512 // print jvm_flags, jvm_args and java_command |
514 static void print_on(outputStream* st); |
513 static void print_on(outputStream* st); |
515 static void print_summary_on(outputStream* st); |
514 static void print_summary_on(outputStream* st); |
516 |
515 |
|
516 // convenient methods to get and set jvm_flags_file |
|
517 static const char* get_jvm_flags_file() { return _jvm_flags_file; } |
|
518 static void set_jvm_flags_file(const char *value) { |
|
519 if (_jvm_flags_file != NULL) { |
|
520 os::free(_jvm_flags_file); |
|
521 } |
|
522 _jvm_flags_file = os::strdup_check_oom(value); |
|
523 } |
517 // convenient methods to obtain / print jvm_flags and jvm_args |
524 // convenient methods to obtain / print jvm_flags and jvm_args |
518 static const char* jvm_flags() { return build_resource_string(_jvm_flags_array, _num_jvm_flags); } |
525 static const char* jvm_flags() { return build_resource_string(_jvm_flags_array, _num_jvm_flags); } |
519 static const char* jvm_args() { return build_resource_string(_jvm_args_array, _num_jvm_args); } |
526 static const char* jvm_args() { return build_resource_string(_jvm_args_array, _num_jvm_args); } |
520 static void print_jvm_flags_on(outputStream* st); |
527 static void print_jvm_flags_on(outputStream* st); |
521 static void print_jvm_args_on(outputStream* st); |
528 static void print_jvm_args_on(outputStream* st); |