You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/06/22 17:53:53 UTC
svn commit: r549855 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init:
harmony.properties parse_arguments.cpp
Author: gshimansky
Date: Fri Jun 22 08:53:53 2007
New Revision: 549855
URL: http://svn.apache.org/viewvc?view=rev&rev=549855
Log:
Applied HARMONY-3409
[drlvm][init] help on 'internal system property' should be available from command line
Modified:
harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/harmony.properties
harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/harmony.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/harmony.properties?view=diff&rev=549855&r1=549854&r2=549855
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/harmony.properties (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/harmony.properties Fri Jun 22 08:53:53 2007
@@ -36,14 +36,11 @@
ECHO018=WARNING: Incorrect {0} gc size specified, using default
ECHO019=WARNING: max heap size is too large, reduced to {0} Mb
ECHO020=WARNING: min heap size reduced to {0} Mb
-ECHO021=Usage: {0} [-options] class [args...]\n (to execute a method main() of the class)\n or {0} [-options] -jar jarfile [args...]\n (to execute the jar file)\n\nwhere options include:\n -classpath <class search path of directories and zip/jar files>\n -cp <class search path of directories and zip/jar files>\n A '{1}' separated list of directories, jar archives,\n and zip archives to search for class file\n -D<name>=<value>\n set a system property\n -showversion print product version and continue\n -version print product version and exit\n -verbose[:class|:gc|:jni]\n enable verbose output\n -agentlib:<library name>[=<agent options>]\n load JVMTI agent library, library name is platform independent\n -agentpath:<library name>[=<agent options]\n load JVMTI agent library, library name is platform dependent\n -verify\n
do full bytecode verification\n -noverify\n do no bytecode verification\n -enableassertions[:<package>...|:<class>]\n -ea[:<package>...|:<class>]\n enable assertions\n -disableassertions[:<package>...|:<class>]\n -da[:<package>...|:<class>]\n disable assertions\n -esa | -enablesystemassertions\n enable system assertions\n -dsa | -disablesystemassertions\n disable system assertions\n -? -help print this help message\n -help properties\n help on system properties\n -X print help on non-standard options
-ECHO022=\ -Xbootclasspath:<PATH>\n Set bootclasspath to the specified value\n -Xbootclasspath/a:<PATH>\n Append specified directories and files to bootclasspath\n -Xbootclasspath/p:<PATH>\n Prepend specified directories and files to bootclasspath\n -Xjit <JIT options>\n Specify JIT specific options\n -Xms<size>\n Set Java heap size\n -Xmx<size>\n Set maximum Java heap size\n -Xss<size>\n Set initial stack size\n -Xdebug\n Does nothing, this is a compatibility option\n -Xnoagent\n Does nothing, this is a compatibility option\n -Xrun\n Specify debugger agent library\n -Xverbose[:<category>[:<file>]\n Switch logging on [for specified category only\n [and log that category to a file]]\n -Xwarn[:<category>[:<file>]\n Switch verbose logging off [for specified category only\n
[and log that category to a file]]\n -Xverboseconf:<file>\n Set up logging via log4cxx configuration file\n -Xverboselog:<file>\n Log verbose output to a file\n -Xverify[:none|all]\n Do full bytecode verification\n -Xinvisible\n Retain invisible annotations at runtime\n -Xfileline\n Add source information to logging messages\n -Xthread\n Add thread id to logging messages\n -Xcategory\n Add category name to logging messages\n -Xtimestamp\n Add timestamp to logging messages\n -Xfunction\n Add function signature to logging messages
+ECHO021=Usage: {0} [-options] class [args...]\n (to execute a method main() of the class)\n or {0} [-options] -jar jarfile [args...]\n (to execute the jar file)\n\nwhere options include:\n -classpath <class search path of directories and zip/jar files>\n -cp <class search path of directories and zip/jar files>\n A '{1}' separated list of directories, jar archives,\n and zip archives to search for class file\n -client select the 'client' VM (same as -Xem:client)\n -server select the 'server' VM (same as -Xem:server)\n -D<name>=<value>\n set a system property\n -showversion print product version and continue\n -version print product version and exit\n -verbose[:class|:gc|:jni]\n enable verbose output\n -agentlib:<library name>[=<agent options>]\n load JVMTI agent library, library name is platform independent\n -agentpath:<
library name>[=<agent options]\n load JVMTI agent library, library name is platform dependent\n -verify\n do full bytecode verification\n -noverify\n do no bytecode verification\n -enableassertions[:<package>...|:<class>]\n -ea[:<package>...|:<class>]\n enable assertions\n -disableassertions[:<package>...|:<class>]\n -da[:<package>...|:<class>]\n disable assertions\n -esa | -enablesystemassertions\n enable system assertions\n -dsa | -disablesystemassertions\n disable system assertions\n -? -help -h print this help message\n -X print help on non-standard options
+ECHO022=\ -Xbootclasspath:<PATH>\n Set bootclasspath to the specified value\n -Xbootclasspath/a:<PATH>\n Append specified directories and files to bootclasspath\n -Xbootclasspath/p:<PATH>\n Prepend specified directories and files to bootclasspath\n -Xms<size>\n Set Java heap size\n -Xmx<size>\n Set maximum Java heap size\n -Xss<size>\n Set initial stack size\n -Xdebug\n Does nothing, this is a compatibility option\n -Xnoagent\n Does nothing, this is a compatibility option\n -Xrun\n Specify debugger agent library\n -Xverbose[:<category>[:<file>]\n Switch logging on [for specified category only\n [and log that category to a file]]\n -Xwarn[:<category>[:<file>]\n Switch verbose logging off [for specified category only\n [and log that category to a file]]\n -Xverboseconf:<file>
\n Set up logging via log4cxx configuration file\n -Xverboselog:<file>\n Log verbose output to a file\n -Xverify[:none|all]\n Do full bytecode verification\n -Xinvisible\n Retain invisible annotations at runtime\n -Xfileline\n Add source information to logging messages\n -Xthread\n Add thread id to logging messages\n -Xcategory\n Add category name to logging messages\n -Xtimestamp\n Add timestamp to logging messages\n -Xfunction\n Add function signature to logging messages
ECHO023=\ -Xlog[:<category>[:<file>]\n Switch debug logging on [for specified category only\n [and log that category to a file]]\n -Xtrace[:<category>[:<file>]\n Switch trace logging on [for specified category only\n [and log that category to a file]]
ECHO024=\ -Xstats:<mask>\n Generates different statistics
-ECHO025=\ -Xint\n Use interpreter to execute the program\n -Xgc:<gc options>\n Specify gc specific options\n -Xem:<em options>\n Specify em specific options\n -Xdumpstubs\n Writes stubs generated by LIL to disk\n -Xparallel_jit\n Launch compilation in parallel (default)\n -Xno_parallel_jit\n Do not launch compilation in parallel\n -Xdumpfile:<file>\n Specifies a file name for the dump\n -XX:<name>=<value>\n set an internal system property
-ECHO026=Boolean-valued properties (set to one of {on,true,1,off,false,0} through -XD<name>=<value>):\n\n vm.assert_dialog (default TRUE):\n If false, prevent assertion failures from popping up a dialog box.
-ECHO027=\ vm.crash_handler (default FALSE):\n Invoke gdb on crashes.
-ECHO028=\ vm.finalize (default TRUE):\n Run finalizers.\n vm.jit_may_inline_sync (default TRUE):\n The JIT is allowed to inline part of the synchronization sequence.\n vm.use_interpreter (default FALSE):\n Use interpreter not jit.\n vm.use_verifier (default TRUE):\n Use verifier.\n vm.jvmti.enabled (default FALSE):\n Whether JVMTI mode is enabled.\n vm.jvmti.compiled_method_load.inlined (default FALSE):\n Report inlined methods with JVMTI_EVENT_COMPILED_METHOD_LOAD. Makes sense for optimizing jit.\n vm.bootclasspath.appendclasspath (default FALSE):\n Append classpath to the bootclasspath.\n\nOther properties:\n\n vm.boot.library.path:\n List of directories which contain additional dynamic libraries to load into VM.\n vm.boot.class.path:\n Virtual machine bootclasspath.\n vm.dlls:\n A '{0}'-delimited list of modular dlls (GC/etc.) to load
at startup.\n vm.em_dll:\n A '{0}'-execution manager (EM) dll to load at startup.\n vm.other_natives_dlls:\n A '{0}'-delimited list of dlls contained native methods implementations to load at startup.\n vm.components.<component>.classpath:\n Part of a <component>'s classpath to append to the JDK booclasspath\n vm.components.<component>.startupclass:\n A <component> class to be initialized during startup
+ECHO025=\ -Xint\n Use interpreter to execute the program\n -Xgc:<gc options>\n Specify gc specific options\n -Xem:<em options>\n Specify em specific options\n -Xdumpstubs\n Writes stubs generated by LIL to disk\n -Xparallel_jit\n Launch compilation in parallel (default)\n -Xno_parallel_jit\n Do not launch compilation in parallel\n -Xdumpfile:<file>\n Specifies a file name for the dump\n -XX:<name>=<value>\n set an internal system property\n Boolean options may be turned on with -XX:+<option>\n and turned off with -XX:-<option>\n Also one of {on,true,1,off,false,0} can be used.\n Numeric options are set with -XX:<option>=<number>.\n Numbers can include suffix 'm' or 'M' for megabytes\n 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes\n\n Please refer to h
ttp://harmony.apache.org/cmd_options.html\n for available properties description
ECHO029=Use {0} -help to get help on command line options
ECHO030=Unknown option {0}
ECHO031=Unknown argument {0} of -Xhelp: option
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?view=diff&rev=549855&r1=549854&r2=549855
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Fri Jun 22 08:53:53 2007
@@ -88,180 +88,30 @@
void print_generic_help()
{
- LECHO(21,
- "Usage: {0} [-options] class [args...]\n"
- " (to execute a method main() of the class)\n"
- " or {0} [-options] -jar jarfile [args...]\n"
- " (to execute the jar file)\n"
- "\n"
- "where options include:\n"
- " -classpath <class search path of directories and zip/jar files>\n"
- " -cp <class search path of directories and zip/jar files>\n"
- " A {1} separated list of directories, jar archives,\n"
- " and zip archives to search for class file\n"
- " -client select the 'client' VM (same as -Xem:client)\n"
- " -server select the 'server' VM (same as -Xem:server)\n"
- " -D<name>=<value>\n"
- " set a system property\n"
- " -showversion print product version and continue\n"
- " -version print product version and exit\n"
- " -verbose[:class|:gc|:jni]\n"
- " enable verbose output\n"
- " -agentlib:<library name>[=<agent options>]\n"
- " load JVMTI agent library, library name is platform independent\n"
- " -agentpath:<library name>[=<agent options]\n"
- " load JVMTI agent library, library name is platform dependent\n"
- " -verify\n"
- " do full bytecode verification\n"
- " -noverify\n"
- " do no bytecode verification\n"
- " -enableassertions[:<package>...|:<class>]\n"
- " -ea[:<package>...|:<class>]\n"
- " enable assertions\n"
- " -disableassertions[:<package>...|:<class>]\n"
- " -da[:<package>...|:<class>]\n"
- " disable assertions\n"
- " -esa | -enablesystemassertions\n"
- " enable system assertions\n"
- " -dsa | -disablesystemassertions\n"
- " disable system assertions\n"
- " -? -help print this help message\n"
- " -help properties\n"
- " help on system properties\n"
- " -X print help on non-standard options"
+ // the '-help' output is defined in resource file 'harmony.properties'
+ LECHO(21, "{0} {1} \n"
+ "Internal error: string resource is undefined in harmony.properties\n"
<< EXECUTABLE_NAME << PORT_PATH_SEPARATOR_STR);
}
static void print_help_on_nonstandard_options()
{
- LECHO(22,
- " -Xbootclasspath:<PATH>\n"
- " Set bootclasspath to the specified value\n"
- " -Xbootclasspath/a:<PATH>\n"
- " Append specified directories and files to bootclasspath\n"
- " -Xbootclasspath/p:<PATH>\n"
- " Prepend specified directories and files to bootclasspath\n"
- " -Xjit <JIT options>\n"
- " Specify JIT specific options\n"
- " -Xms<size>\n"
- " Set Java heap size\n"
- " -Xmx<size>\n"
- " Set maximum Java heap size\n"
- " -Xdebug\n"
- " Does nothing, this is a compatibility option\n"
- " -Xnoagent\n"
- " Does nothing, this is a compatibility option\n"
- " -Xrun\n"
- " Specify debugger agent library\n"
- " -Xverbose[:<category>[:<file>]\n"
- " Switch logging on [for specified category only\n"
- " [and log that category to a file]]\n"
- " -Xwarn[:<category>[:<file>]\n"
- " Switch verbose logging off [for specified category only\n"
- " [and log that category to a file]]\n"
- " -Xverboseconf:<file>\n"
- " Set up logging via log4cxx configuration file\n"
- " -Xverboselog:<file>\n"
- " Log verbose output to a file\n"
- " -Xverify[:none|all]\n"
- " Do full bytecode verification\n"
- " -Xinvisible\n"
- " Retain invisible annotations at runtime\n"
- " -Xfileline\n"
- " Add source information to logging messages\n"
- " -Xthread\n"
- " Add thread id to logging messages\n"
- " -Xcategory\n"
- " Add category name to logging messages\n"
- " -Xtimestamp\n"
- " Add timestamp to logging messages\n"
- " -Xfunction\n"
- " Add function signature to logging messages");
+ // the '-X' output is defined in resource file 'harmony.properties'
+ LECHO(22, // base -X help output (like -Xbootclasspath, -Xmx)
+ "Internal error: string resource is undefined in harmony.properties\n");
#ifdef _DEBUG
- LECHO(23,
- " -Xlog[:<category>[:<file>]\n"
- " Switch debug logging on [for specified category only\n"
- " [and log that category to a file]]\n"
- " -Xtrace[:<category>[:<file>]\n"
- " Switch trace logging on [for specified category only\n"
- " [and log that category to a file]]");
+ LECHO(23, // -Xlog & -Xtrace help output
+ "Internal error: string resource is undefined in harmony.properties\n");
#endif //_DEBUG
#ifdef VM_STATS
- LECHO(24,
- " -Xstats:<mask>\n"
- " Generates different statistics");
+ LECHO(24, // -Xstats help output
+ "Internal error: string resource is undefined in harmony.properties\n");
#endif // VM_STATS
- LECHO(25,
- " -Xint\n"
- " Use interpreter to execute the program\n"
- " -Xgc:<gc options>\n"
- " Specify gc specific options\n"
- " -Xem:<em options>\n"
- " Specify em specific options\n"
- " -Xdumpstubs\n"
- " Writes stubs generated by LIL to disk\n"
- " -Xparallel_jit\n"
- " Launch compilation in parallel (default)\n"
- " -Xno_parallel_jit\n"
- " Do not launch compilation in parallel\n"
- " -Xdumpfile:<file>\n"
- " Specifies a file name for the dump\n"
- " -XX:<name>=<value>\n"
- " set an internal system property.\n"
- " Boolean options may be turned on with -XX:+<option>\n"
- " and turned off with -XX:-<option>\n"
- " Numeric options are set with -XX:<option>=<number>.\n"
- " Numbers can include suffix 'm' or 'M' for megabytes,\n"
- " 'k' or 'K' for kilobytes, and 'g' or 'G' for gigabytes\n"
- " (for example, 32k is the same as 32768).\n"
- );
+ LECHO(25, // -Xint, -Xgc, -Xem, -XX help with URL to properties description
+ "Internal error: string resource is undefined in harmony.properties\n");
} //print_help_on_nonstandard_options
-void print_vm_standard_properties()
-{
- LECHO(26,
- "Boolean-valued properties (set to one of {on,true,1,off,false,0} through -XD<name>=<value>):\n\n"
- " vm.assert_dialog (default TRUE):\n"
- " If false, prevent assertion failures from popping up a dialog box.");
-#ifdef PLATFORM_POSIX
- LECHO(27, " vm.crash_handler (default FALSE):\n"
- " Invoke gdb on crashes.");
-#endif // PLATFORM_POSIX
- LECHO(28, " vm.finalize (default TRUE):\n"
- " Run finalizers.\n"
- " vm.jit_may_inline_sync (default TRUE):\n"
- " The JIT is allowed to inline part of the synchronization sequence.\n"
- " vm.use_interpreter (default FALSE):\n"
- " Use interpreter not jit.\n"
- " vm.use_verifier (default TRUE):\n"
- " Use verifier.\n"
- " vm.jvmti.enabled (default FALSE):\n"
- " Whether JVMTI mode is enabled.\n"
- " vm.jvmti.compiled_method_load.inlined (default FALSE):\n"
- " Report inlined methods with JVMTI_EVENT_COMPILED_METHOD_LOAD. Makes sense for optimizing jit.\n"
- " vm.bootclasspath.appendclasspath (default FALSE):\n"
- " Append classpath to the bootclasspath.\n"
- " thread.soft_unreservation (default FALSE):\n"
- " Use soft unreservation scheme.\n"
- "\nOther properties:\n\n"
- " vm.boot.library.path:\n"
- " List of directories which contain additional dynamic libraries to load into VM.\n"
- " vm.boot.class.path:\n"
- " Virtual machine bootclasspath.\n"
- " vm.dlls:\n"
- " A '{0}'-delimited list of modular dlls (GC/etc.) to load at startup.\n"
- " vm.em_dll:\n"
- " A '{0}'-execution manager (EM) dll to load at startup.\n"
- " vm.other_natives_dlls:\n"
- " A '{0}'-delimited list of dlls contained native methods implementations to load at startup.\n"
- " vm.components.<component>.classpath:\n"
- " Part of a <component>'s classpath to append to the JDK bootclasspath\n"
- " vm.components.<component>.startupclass:\n"
- " A <component> class to be initialized during startup" << PORT_PATH_SEPARATOR_STR);
-
-}
-
static inline Assertion_Registry* get_assert_reg(Global_Env *p_env) {
if (!p_env->assert_reg) {
void * mem = apr_palloc(p_env->mem_pool, sizeof(Assertion_Registry));
@@ -374,18 +224,6 @@
p_env->VmProperties()->set(XBOOTCLASSPATH_P, bcp_old ? bcp_new : value);
p_env->VmProperties()->destroy(bcp_old);
STD_FREE((void*)bcp_new);
- }
- else if (begins_with(option, "-Xhelp:")) {
- const char* arg = option + strlen("-Xhelp:");
-
- if (begins_with(arg, "prop")) {
- print_vm_standard_properties();
-
- } else {
- LECHO(31, "Unknown argument {0} of -Xhelp: option" << arg);
- }
-
- LOGGER_EXIT(0);
} else if (begins_with(option, "-Xjit:")) {
// Do nothing here, just skip this option for later parsing
} else if (strcmp(option, "-Xint") == 0) {