53 #if defined(ENABLE_JIT)
91 #if defined(ENABLE_LOOP)
92 bool opt_loops =
false;
97 #if defined(ENABLE_STATISTICS)
98 bool opt_stat =
false;
99 bool opt_getloadingtime =
false;
100 bool opt_getcompilingtime =
false;
102 #if defined(ENABLE_VERIFIER)
106 #if defined(ENABLE_PROFILING)
107 bool opt_prof =
false;
108 bool opt_prof_bb =
false;
111 #if defined(ENABLE_OPAGENT)
112 bool opt_opagent =
false;
117 #if defined(ENABLE_IFCONV)
121 #if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
122 bool opt_lsra =
false;
124 #if defined(ENABLE_SSA)
125 bool opt_ssa_dce =
false;
126 bool opt_ssa_cp =
false;
132 #if defined(ENABLE_INTRP)
133 bool opt_no_dynamic =
false;
134 bool opt_no_replication =
false;
135 bool opt_no_quicksuper =
false;
138 s4 opt_static_supers = 0x7fffffff;
139 bool vm_debug =
false;
142 #if defined(ENABLE_DEBUG_FILTER)
176 #if defined(ENABLE_DISASSEMBLER)
177 int opt_DisassembleStubs = 0;
179 #if defined(ENABLE_OPAGENT)
180 int opt_EnableOpagent = 0;
182 #if defined(ENABLE_GC_CACAO)
183 int opt_GCDebugRootSet = 0;
184 int opt_GCStress = 0;
186 #if defined(ENABLE_INLINING)
188 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
189 int opt_InlineAll = 0;
190 int opt_InlineCount = INT_MAX;
191 int opt_InlineMaxSize = INT_MAX;
192 int opt_InlineMinSize = 0;
193 char* opt_InlineMethod = NULL;
203 #if defined(ENABLE_REPLACEMENT)
204 char* opt_ReplaceMethod = NULL;
205 char* opt_OptimizeMethod = NULL;
206 bool opt_DisableCountdownTraps =
false;
212 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
213 int opt_TraceInlining = 0;
220 #if defined(ENABLE_RT_TIMING)
221 FILE *opt_RtTimingLogfile = NULL;
222 bool opt_RtTimingCSV =
false;
224 #if defined(ENABLE_STATISTICS)
225 FILE *opt_StatisticsLogfile = NULL;
226 bool opt_StatisticsCSV =
false;
228 #if defined(ENABLE_JVMTI)
229 int opt_TraceJVMTICalls = 0;
330 #if defined(ENABLE_DISASSEMBLER)
333 #if defined(ENABLE_OPAGENT)
336 #if defined(ENABLE_GC_CACAO)
340 #if defined(ENABLE_INLINING)
342 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
356 #if defined(ENABLE_REPLACEMENT)
366 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
374 #if defined(ENABLE_JVMTI)
380 #if defined(ENABLE_RT_TIMING)
384 #if defined(ENABLE_STATISTICS)
391 { NULL, -1, -1, NULL }
411 option = vm_args->options[
opt_index].optionString;
413 if ((option == NULL) || (option[0] !=
'-'))
416 for (i = 0; opts[
i].
name; i++) {
420 if (strcmp(option + 1, opts[i].
name) == 0) {
430 if (strcmp(option + 1, opts[i].
name) == 0) {
433 if (opt_index < vm_args->nOptions) {
451 if (memcmp(option + 1, opts[i].name, l) == 0) {
482 for (opt = options_XX; opt->
name != NULL; opt++) {
498 vm_abort(
"options_xxusage: unkown option type %d", opt->
type);
504 if (length < (29 - 1)) {
507 for (i = length; i < 29; i++)
519 if (length < (80 - 29)) {
523 for (c = opt->
doc, i = 29; *c != 0; c++, i++) {
562 const char *filename;
568 for (i = 0; i < vm_args->nOptions; i++) {
571 name = vm_args->options[
i].optionString;
575 if (strcmp(name,
"-XX") == 0)
580 start = strstr(name,
"-XX:");
582 if ((start == NULL) || (start != name))
587 if (name[4] ==
'+') {
588 start = name + 4 + 1;
591 else if (name[4] ==
'-') {
592 start = name + 4 + 1;
603 end = strchr(start,
'=');
610 length = end - start;
611 value = (
char*) (end + 1);
616 for (opt = options_XX; opt->
name != NULL; opt++) {
617 if (strncmp(opt->
name, start, length) == 0) {
622 if ((enable == -1) || (value != NULL))
626 if ((enable != -1) || (value == NULL))
630 vm_abort(
"options_xx: unknown option type %d for option %s",
640 switch (opt->
value) {
717 if (strcmp(
"auto",value) == 0)
719 if (strcmp(
"no",value) == 0)
721 if (strcmp(
"yes",value) == 0)
726 #if defined(ENABLE_DISASSEMBLER)
728 opt_DisassembleStubs = enable;
732 #if defined(ENABLE_OPAGENT)
734 opt_EnableOpagent = enable;
738 #if defined(ENABLE_GC_CACAO)
740 opt_GCDebugRootSet = enable;
744 opt_GCStress = enable;
748 #if defined(ENABLE_INLINING)
752 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
754 opt_InlineAll = enable;
764 opt_InlineMaxSize =
os::atoi(value);
769 opt_InlineMinSize =
os::atoi(value);
775 opt_InlineMethod = value;
801 # if defined(ENABLE_STATISTICS)
810 filename =
"profile.dat";
814 file = fopen(filename,
"w");
819 vm_abort(
"options_xx: fopen failed");
828 #if defined(ENABLE_REPLACEMENT)
830 opt_ReplaceMethod = value;
834 opt_OptimizeMethod = value;
838 opt_DisableCountdownTraps =
true;
858 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
861 opt_TraceInlining = 1;
863 opt_TraceInlining =
os::atoi(value);
888 #if defined(ENABLE_JVMTI)
890 opt_TraceJVMTICalls = enable;
906 #if defined(ENABLE_RT_TIMING)
913 if ( (strnlen(filename, 2) == 1) && (filename[0] ==
'-') ) {
916 file = fopen(filename,
"w");
922 opt_RtTimingLogfile = file;
925 opt_RtTimingCSV = enable;
929 #if defined(ENABLE_STATISTICS)
936 if ( (strnlen(filename, 2) == 1) && (filename[0] ==
'-') ) {
939 file = fopen(filename,
"w");
945 opt_StatisticsLogfile = file;
948 opt_StatisticsCSV = enable;
954 size_t name_len = strlen(name);
955 size_t value_len = 0;
957 size_t tmp_name_len = (value -
name) /
sizeof(
char);
958 value_len = name_len - tmp_name_len;
959 name_len = tmp_name_len - 1;
960 assert(name[name_len] ==
'=');
963 assert(name[name_len] ==
'\0');
967 name, name_len, value, value_len)) {
968 fprintf(stderr,
"Unknown -XX option: %s\n", name);
static void options_xxusage(void)
bool opt_AlwaysMmapFirstPage
static void print_usage(OptionPrefix &root, FILE *fp=stdout)
int opt_ProfileGCMemoryUsage
static void abort_errno(const char *text,...)
Equal to abort_errnum, but uses errno to get the error number.
int opt_ProfileMemoryUsage
int opt_TraceJVMCallsVerbose
int64_t opt_MaxDirectMemorySize
char * opt_CompileSignature
JNIEnv jclass jobject const char * name
const char * opt_filter_show_method
const char * opt_filter_verbosecall_exclude
static size_t strlen(const char *s)
void vm_abort(const char *text,...)
static int atoi(const char *nptr)
int opt_TraceBuiltinCalls
int opt_TraceCompilerCalls
void options_xx(JavaVMInitArgs *vm_args)
bool opt_showddatasegment
static void set_force_color(int)
force color (0 = disabled, 1 = yes, 0 = no)
int opt_DebugLocalReferences
FILE * opt_ProfileMemoryUsageGNUPlot
int options_get(opt_struct *opts, JavaVMInitArgs *vm_args)
This file contains the command line option parsing library.
bool opt_showintermediate
int opt_TraceSubsystemInitialization
const char * opt_filter_verbosecall_include
const char const void jint length
bool opt_AlwaysEmitLongBranches
int opt_DebugStackFrameInfo
static bool parse_option(OptionPrefix &root, const char *name, size_t name_len, const char *value, size_t value_len)
static char * strdup(const char *s)