src/share/vm/runtime/arguments.hpp

Print this page




 237     arg_too_small  = -2,
 238     arg_too_big    = -1,
 239     arg_in_range   = 0
 240   };
 241 
 242  private:
 243 
 244   // an array containing all flags specified in the .hotspotrc file
 245   static char** _jvm_flags_array;
 246   static int    _num_jvm_flags;
 247   // an array containing all jvm arguments specified in the command line
 248   static char** _jvm_args_array;
 249   static int    _num_jvm_args;
 250   // string containing all java command (class/jarfile name and app args)
 251   static char* _java_command;
 252 
 253   // Property list
 254   static SystemProperty* _system_properties;
 255 
 256   // Quick accessor to System properties in the list:
 257   static SystemProperty *_java_ext_dirs;
 258   static SystemProperty *_java_endorsed_dirs;
 259   static SystemProperty *_sun_boot_library_path;
 260   static SystemProperty *_java_library_path;
 261   static SystemProperty *_java_home;
 262   static SystemProperty *_java_class_path;
 263   static SystemProperty *_sun_boot_class_path;
 264 
 265   // Meta-index for knowing what packages are in the boot class path
 266   static char* _meta_index_path;
 267   static char* _meta_index_dir;
 268 




 269   // java.vendor.url.bug, bug reporting URL for fatal errors.
 270   static const char* _java_vendor_url_bug;
 271 
 272   // sun.java.launcher, private property to provide information about
 273   // java launcher
 274   static const char* _sun_java_launcher;
 275 
 276   // sun.java.launcher.pid, private property
 277   static int    _sun_java_launcher_pid;
 278 
 279   // was this VM created via the -XXaltjvm=<path> option
 280   static bool   _sun_java_launcher_is_altjvm;
 281 
 282   // Option flags
 283   static bool   _has_profile;
 284   static const char*  _gc_log_filename;
 285   // Value of the conservative maximum heap alignment needed
 286   static size_t  _conservative_max_heap_alignment;
 287 
 288   static uintx _min_heap_size;


 569 
 570   // Update/Initialize System properties after JDK version number is known
 571   static void init_version_specific_system_properties();
 572 
 573   // Property List manipulation
 574   static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
 575   static void PropertyList_add(SystemProperty** plist, const char* k, char* v);
 576   static void PropertyList_unique_add(SystemProperty** plist, const char* k, char* v) {
 577     PropertyList_unique_add(plist, k, v, false);
 578   }
 579   static void PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append);
 580   static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
 581   static int  PropertyList_count(SystemProperty* pl);
 582   static const char* PropertyList_get_key_at(SystemProperty* pl,int index);
 583   static char* PropertyList_get_value_at(SystemProperty* pl,int index);
 584 
 585   // Miscellaneous System property value getter and setters.
 586   static void set_dll_dir(char *value) { _sun_boot_library_path->set_value(value); }
 587   static void set_java_home(char *value) { _java_home->set_value(value); }
 588   static void set_library_path(char *value) { _java_library_path->set_value(value); }
 589   static void set_ext_dirs(char *value) { _java_ext_dirs->set_value(value); }
 590   static void set_endorsed_dirs(char *value) { _java_endorsed_dirs->set_value(value); }
 591   static void set_sysclasspath(char *value) { _sun_boot_class_path->set_value(value); }
 592   static void append_sysclasspath(const char *value) { _sun_boot_class_path->append_value(value); }
 593   static void set_meta_index_path(char* meta_index_path, char* meta_index_dir) {
 594     _meta_index_path = meta_index_path;
 595     _meta_index_dir  = meta_index_dir;
 596   }
 597 
 598   static char* get_java_home() { return _java_home->value(); }
 599   static char* get_dll_dir() { return _sun_boot_library_path->value(); }
 600   static char* get_endorsed_dir() { return _java_endorsed_dirs->value(); }
 601   static char* get_sysclasspath() { return _sun_boot_class_path->value(); }
 602   static char* get_meta_index_path() { return _meta_index_path; }
 603   static char* get_meta_index_dir()  { return _meta_index_dir;  }
 604   static char* get_ext_dirs() { return _java_ext_dirs->value(); }
 605   static char* get_appclasspath() { return _java_class_path->value(); }
 606   static void  fix_appclasspath();
 607 

 608   // Operation modi
 609   static Mode mode()                { return _mode; }
 610   static bool is_interpreter_only() { return mode() == _int; }
 611 
 612 
 613   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 614   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 615 };
 616 
 617 bool Arguments::gc_selected() {
 618   return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC ||
 619     UseParNewGC || UseSerialGC;
 620 }
 621 
 622 bool Arguments::check_gc_consistency_ergo() {
 623   return check_gc_consistency_user();
 624 }
 625 
 626 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP


 237     arg_too_small  = -2,
 238     arg_too_big    = -1,
 239     arg_in_range   = 0
 240   };
 241 
 242  private:
 243 
 244   // an array containing all flags specified in the .hotspotrc file
 245   static char** _jvm_flags_array;
 246   static int    _num_jvm_flags;
 247   // an array containing all jvm arguments specified in the command line
 248   static char** _jvm_args_array;
 249   static int    _num_jvm_args;
 250   // string containing all java command (class/jarfile name and app args)
 251   static char* _java_command;
 252 
 253   // Property list
 254   static SystemProperty* _system_properties;
 255 
 256   // Quick accessor to System properties in the list:


 257   static SystemProperty *_sun_boot_library_path;
 258   static SystemProperty *_java_library_path;
 259   static SystemProperty *_java_home;
 260   static SystemProperty *_java_class_path;
 261   static SystemProperty *_sun_boot_class_path;
 262 
 263   // Meta-index for knowing what packages are in the boot class path
 264   static char* _meta_index_path;
 265   static char* _meta_index_dir;
 266 
 267   // temporary: to emit warning if the default ext dirs are not empty.
 268   // remove this variable when the warning is no longer needed.
 269   static char* _ext_dirs;
 270 
 271   // java.vendor.url.bug, bug reporting URL for fatal errors.
 272   static const char* _java_vendor_url_bug;
 273 
 274   // sun.java.launcher, private property to provide information about
 275   // java launcher
 276   static const char* _sun_java_launcher;
 277 
 278   // sun.java.launcher.pid, private property
 279   static int    _sun_java_launcher_pid;
 280 
 281   // was this VM created via the -XXaltjvm=<path> option
 282   static bool   _sun_java_launcher_is_altjvm;
 283 
 284   // Option flags
 285   static bool   _has_profile;
 286   static const char*  _gc_log_filename;
 287   // Value of the conservative maximum heap alignment needed
 288   static size_t  _conservative_max_heap_alignment;
 289 
 290   static uintx _min_heap_size;


 571 
 572   // Update/Initialize System properties after JDK version number is known
 573   static void init_version_specific_system_properties();
 574 
 575   // Property List manipulation
 576   static void PropertyList_add(SystemProperty** plist, SystemProperty *element);
 577   static void PropertyList_add(SystemProperty** plist, const char* k, char* v);
 578   static void PropertyList_unique_add(SystemProperty** plist, const char* k, char* v) {
 579     PropertyList_unique_add(plist, k, v, false);
 580   }
 581   static void PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append);
 582   static const char* PropertyList_get_value(SystemProperty* plist, const char* key);
 583   static int  PropertyList_count(SystemProperty* pl);
 584   static const char* PropertyList_get_key_at(SystemProperty* pl,int index);
 585   static char* PropertyList_get_value_at(SystemProperty* pl,int index);
 586 
 587   // Miscellaneous System property value getter and setters.
 588   static void set_dll_dir(char *value) { _sun_boot_library_path->set_value(value); }
 589   static void set_java_home(char *value) { _java_home->set_value(value); }
 590   static void set_library_path(char *value) { _java_library_path->set_value(value); }
 591   static void set_ext_dirs(char *value)     { _ext_dirs = os::strdup_check_oom(value); }

 592   static void set_sysclasspath(char *value) { _sun_boot_class_path->set_value(value); }
 593   static void append_sysclasspath(const char *value) { _sun_boot_class_path->append_value(value); }
 594   static void set_meta_index_path(char* meta_index_path, char* meta_index_dir) {
 595     _meta_index_path = meta_index_path;
 596     _meta_index_dir  = meta_index_dir;
 597   }
 598 
 599   static char* get_java_home() { return _java_home->value(); }
 600   static char* get_dll_dir() { return _sun_boot_library_path->value(); }

 601   static char* get_sysclasspath() { return _sun_boot_class_path->value(); }
 602   static char* get_meta_index_path() { return _meta_index_path; }
 603   static char* get_meta_index_dir()  { return _meta_index_dir;  }
 604   static char* get_ext_dirs()        { return _ext_dirs;  }
 605   static char* get_appclasspath() { return _java_class_path->value(); }
 606   static void  fix_appclasspath();
 607 
 608 
 609   // Operation modi
 610   static Mode mode()                { return _mode; }
 611   static bool is_interpreter_only() { return mode() == _int; }
 612 
 613 
 614   // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
 615   static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen);
 616 };
 617 
 618 bool Arguments::gc_selected() {
 619   return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC ||
 620     UseParNewGC || UseSerialGC;
 621 }
 622 
 623 bool Arguments::check_gc_consistency_ergo() {
 624   return check_gc_consistency_user();
 625 }
 626 
 627 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP