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 int opt_TestReplacement = 0;
210 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
211 int opt_TraceInlining = 0;
218 #if defined(ENABLE_RT_TIMING)
219 FILE *opt_RtTimingLogfile = NULL;
220 bool opt_RtTimingCSV =
false;
222 #if defined(ENABLE_STATISTICS)
223 FILE *opt_StatisticsLogfile = NULL;
224 bool opt_StatisticsCSV =
false;
226 #if defined(ENABLE_JVMTI)
227 int opt_TraceJVMTICalls = 0;
230 #if defined(ENABLE_REPLACEMENT)
231 int opt_TraceReplacement = 0;
329 #if defined(ENABLE_DISASSEMBLER)
332 #if defined(ENABLE_OPAGENT)
335 #if defined(ENABLE_GC_CACAO)
339 #if defined(ENABLE_INLINING)
341 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
355 #if defined(ENABLE_REPLACEMENT)
362 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
370 #if defined(ENABLE_JVMTI)
374 #if defined(ENABLE_REPLACEMENT)
379 #if defined(ENABLE_RT_TIMING)
383 #if defined(ENABLE_STATISTICS)
390 { NULL, -1, -1, NULL }
410 option = vm_args->options[
opt_index].optionString;
412 if ((option == NULL) || (option[0] !=
'-'))
415 for (i = 0; opts[
i].
name; i++) {
419 if (strcmp(option + 1, opts[i].
name) == 0) {
429 if (strcmp(option + 1, opts[i].
name) == 0) {
432 if (opt_index < vm_args->nOptions) {
450 if (memcmp(option + 1, opts[i].name, l) == 0) {
481 for (opt = options_XX; opt->
name != NULL; opt++) {
497 vm_abort(
"options_xxusage: unkown option type %d", opt->
type);
503 if (length < (29 - 1)) {
506 for (i = length; i < 29; i++)
518 if (length < (80 - 29)) {
522 for (c = opt->
doc, i = 29; *c != 0; c++, i++) {
561 const char *filename;
567 for (i = 0; i < vm_args->nOptions; i++) {
570 name = vm_args->options[
i].optionString;
574 if (strcmp(name,
"-XX") == 0)
579 start = strstr(name,
"-XX:");
581 if ((start == NULL) || (start != name))
586 if (name[4] ==
'+') {
587 start = name + 4 + 1;
590 else if (name[4] ==
'-') {
591 start = name + 4 + 1;
602 end = strchr(start,
'=');
609 length = end - start;
610 value = (
char*) (end + 1);
615 for (opt = options_XX; opt->
name != NULL; opt++) {
616 if (strncmp(opt->
name, start, length) == 0) {
621 if ((enable == -1) || (value != NULL))
625 if ((enable != -1) || (value == NULL))
629 vm_abort(
"options_xx: unknown option type %d for option %s",
639 switch (opt->
value) {
716 if (strcmp(
"auto",value) == 0)
718 if (strcmp(
"no",value) == 0)
720 if (strcmp(
"yes",value) == 0)
725 #if defined(ENABLE_DISASSEMBLER)
727 opt_DisassembleStubs = enable;
731 #if defined(ENABLE_OPAGENT)
733 opt_EnableOpagent = enable;
737 #if defined(ENABLE_GC_CACAO)
739 opt_GCDebugRootSet = enable;
743 opt_GCStress = enable;
747 #if defined(ENABLE_INLINING)
751 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
753 opt_InlineAll = enable;
763 opt_InlineMaxSize =
os::atoi(value);
768 opt_InlineMinSize =
os::atoi(value);
774 opt_InlineMethod = value;
800 # if defined(ENABLE_STATISTICS)
809 filename =
"profile.dat";
813 file = fopen(filename,
"w");
818 vm_abort(
"options_xx: fopen failed");
827 #if defined(ENABLE_REPLACEMENT)
829 opt_TestReplacement = enable;
849 #if defined(ENABLE_INLINING) && !defined(NDEBUG)
852 opt_TraceInlining = 1;
854 opt_TraceInlining =
os::atoi(value);
879 #if defined(ENABLE_JVMTI)
881 opt_TraceJVMTICalls = enable;
889 #if defined(ENABLE_REPLACEMENT)
892 opt_TraceReplacement = 1;
894 opt_TraceReplacement =
os::atoi(value);
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)