+
+/* -XX options ****************************************************************/
+
+/* NOTE: For better readability keep these alpha-sorted. */
+
+/* Options which must always be available (production options in
+ HotSpot). */
+
+int64_t opt_MaxDirectMemorySize = -1;
+int opt_MaxPermSize = 0;
+int opt_PermSize = 0;
+int opt_ThreadStackSize = 0;
+
+/* Debugging options which can be turned off. */
+
+bool opt_AlwaysEmitLongBranches = false;
+bool opt_AlwaysMmapFirstPage = false;
+int opt_CompileAll = 0;
+char* opt_CompileMethod = NULL;
+char* opt_CompileSignature = NULL;
+int opt_DebugExceptions = 0;
+int opt_DebugFinalizer = 0;
+int opt_DebugLocalReferences = 0;
+int opt_DebugLocks = 0;
+int opt_DebugPackage = 0;
+int opt_DebugPatcher = 0;
+int opt_DebugProperties = 0;
+int opt_DebugStackFrameInfo = 0;
+int opt_DebugStackTrace = 0;
+int opt_DebugThreads = 0;
+#if defined(ENABLE_DISASSEMBLER)
+int opt_DisassembleStubs = 0;
+#endif
+#if defined(ENABLE_OPAGENT)
+int opt_EnableOpagent = 0;
+#endif
+#if defined(ENABLE_GC_CACAO)
+int opt_GCDebugRootSet = 0;
+int opt_GCStress = 0;
+#endif
+#if defined(ENABLE_INLINING)
+int opt_Inline = 0;
+#if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
+int opt_InlineAll = 0;
+int opt_InlineCount = INT_MAX;
+int opt_InlineMaxSize = INT_MAX;
+int opt_InlineMinSize = 0;
+#endif
+#endif
+int opt_PrintConfig = 0;
+int opt_PrintWarnings = 0;
+int opt_ProfileGCMemoryUsage = 0;
+int opt_ProfileMemoryUsage = 0;
+FILE *opt_ProfileMemoryUsageGNUPlot = NULL;
+int opt_RegallocSpillAll = 0;
+#if defined(ENABLE_REPLACEMENT)
+int opt_TestReplacement = 0;
+#endif
+int opt_TraceBuiltinCalls = 0;
+int opt_TraceCompilerCalls = 0;
+int opt_TraceExceptions = 0;
+int opt_TraceHPI = 0;
+#if defined(ENABLE_INLINING) && !defined(NDEBUG)
+int opt_TraceInlining = 0;
+#endif
+int opt_TraceJavaCalls = 0;
+bool opt_TraceJMMCalls = false;
+int opt_TraceJNICalls = 0;
+int opt_TraceJVMCalls = 0;
+int opt_TraceJVMCallsVerbose = 0;
+#if defined(ENABLE_JVMTI)
+int opt_TraceJVMTICalls = 0;
+#endif
+int opt_TraceLinkClass = 0;
+#if defined(ENABLE_REPLACEMENT)
+int opt_TraceReplacement = 0;
+#endif
+int opt_TraceSubsystemInitialization = 0;
+int opt_TraceTraps = 0;
+
+
+enum {
+ OPT_TYPE_BOOLEAN,
+ OPT_TYPE_VALUE
+};
+
+enum {
+ /* Options which must always be available (production options in
+ HotSpot). */
+
+ OPT_MaxDirectMemorySize,
+ OPT_MaxPermSize,
+ OPT_PermSize,
+ OPT_ThreadStackSize,
+
+ /* Debugging options which can be turned off. */
+
+ OPT_AlwaysEmitLongBranches,
+ OPT_AlwaysMmapFirstPage,
+ OPT_CompileAll,
+ OPT_CompileMethod,
+ OPT_CompileSignature,
+ OPT_DebugExceptions,
+ OPT_DebugFinalizer,
+ OPT_DebugLocalReferences,
+ OPT_DebugLocks,
+ OPT_DebugPackage,
+ OPT_DebugPatcher,
+ OPT_DebugProperties,
+ OPT_DebugStackFrameInfo,
+ OPT_DebugStackTrace,
+ OPT_DebugThreads,
+ OPT_DisassembleStubs,
+ OPT_EnableOpagent,
+ OPT_GCDebugRootSet,
+ OPT_GCStress,
+ OPT_Inline,
+ OPT_InlineAll,
+ OPT_InlineCount,
+ OPT_InlineMaxSize,
+ OPT_InlineMinSize,
+ OPT_PrintConfig,
+ OPT_PrintWarnings,
+ OPT_ProfileGCMemoryUsage,
+ OPT_ProfileMemoryUsage,
+ OPT_ProfileMemoryUsageGNUPlot,
+ OPT_RegallocSpillAll,
+ OPT_TestReplacement,
+ OPT_TraceBuiltinCalls,
+ OPT_TraceCompilerCalls,
+ OPT_TraceExceptions,
+ OPT_TraceHPI,
+ OPT_TraceInlining,
+ OPT_TraceJavaCalls,
+ OPT_TraceJMMCalls,
+ OPT_TraceJNICalls,
+ OPT_TraceJVMCalls,
+ OPT_TraceJVMCallsVerbose,
+ OPT_TraceJVMTICalls,
+ OPT_TraceLinkClass,
+ OPT_TraceReplacement,
+ OPT_TraceSubsystemInitialization,
+ OPT_TraceTraps,
+ OPT_Vmlog,
+ OPT_VmlogStrings,
+ OPT_VmlogIgnore
+};
+
+
+option_t options_XX[] = {
+ /* Options which must always be available (production options in
+ HotSpot). */
+
+ { "MaxDirectMemorySize", OPT_MaxDirectMemorySize, OPT_TYPE_VALUE, "Maximum total size of NIO direct-buffer allocations" },
+ { "MaxPermSize", OPT_MaxPermSize, OPT_TYPE_VALUE, "not implemented" },
+ { "PermSize", OPT_PermSize, OPT_TYPE_VALUE, "not implemented" },
+ { "ThreadStackSize", OPT_ThreadStackSize, OPT_TYPE_VALUE, "TODO" },
+
+ /* Debugging options which can be turned off. */
+
+ { "AlwaysEmitLongBranches", OPT_AlwaysEmitLongBranches, OPT_TYPE_BOOLEAN, "Always emit long-branches." },
+ { "AlwaysMmapFirstPage", OPT_AlwaysMmapFirstPage, OPT_TYPE_BOOLEAN, "Always mmap memory page at address 0x0." },
+ { "CompileAll", OPT_CompileAll, OPT_TYPE_BOOLEAN, "compile all methods, no execution" },
+ { "CompileMethod", OPT_CompileMethod, OPT_TYPE_VALUE, "compile only a specific method" },
+ { "CompileSignature", OPT_CompileSignature, OPT_TYPE_VALUE, "specify signature for a specific method" },
+ { "DebugExceptions", OPT_DebugExceptions, OPT_TYPE_BOOLEAN, "debug exceptions" },
+ { "DebugFinalizer", OPT_DebugFinalizer, OPT_TYPE_BOOLEAN, "debug finalizer thread" },
+ { "DebugLocalReferences", OPT_DebugLocalReferences, OPT_TYPE_BOOLEAN, "print debug information for local reference tables" },
+ { "DebugLocks", OPT_DebugLocks, OPT_TYPE_BOOLEAN, "print debug information for locks" },
+ { "DebugPackage", OPT_DebugPackage, OPT_TYPE_BOOLEAN, "debug Java boot-packages" },
+ { "DebugPatcher", OPT_DebugPatcher, OPT_TYPE_BOOLEAN, "debug JIT code patching" },
+ { "DebugProperties", OPT_DebugProperties, OPT_TYPE_BOOLEAN, "print debug information for properties" },
+ { "DebugStackFrameInfo", OPT_DebugStackFrameInfo, OPT_TYPE_BOOLEAN, "TODO" },
+ { "DebugStackTrace", OPT_DebugStackTrace, OPT_TYPE_BOOLEAN, "debug stacktrace creation" },
+ { "DebugThreads", OPT_DebugThreads, OPT_TYPE_BOOLEAN, "print debug information for threads" },
+#if defined(ENABLE_DISASSEMBLER)
+ { "DisassembleStubs", OPT_DisassembleStubs, OPT_TYPE_BOOLEAN, "disassemble builtin and native stubs when generated" },
+#endif
+#if defined(ENABLE_OPAGENT)
+ { "EnableOpagent", OPT_EnableOpagent, OPT_TYPE_BOOLEAN, "enable providing JIT output to Oprofile" },
+#endif
+#if defined(ENABLE_GC_CACAO)
+ { "GCDebugRootSet", OPT_GCDebugRootSet, OPT_TYPE_BOOLEAN, "GC: print root-set at collection" },
+ { "GCStress", OPT_GCStress, OPT_TYPE_BOOLEAN, "GC: forced collection at every allocation" },
+#endif
+#if defined(ENABLE_INLINING)
+ { "Inline", OPT_Inline, OPT_TYPE_BOOLEAN, "enable method inlining" },
+#if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
+ { "InlineAll", OPT_InlineAll, OPT_TYPE_BOOLEAN, "use inlining in all compilations" },
+ { "InlineCount", OPT_InlineCount, OPT_TYPE_VALUE, "stop inlining after the given number of roots" },
+ { "InlineMaxSize", OPT_InlineMaxSize, OPT_TYPE_VALUE, "maximum size for inlined result" },
+ { "InlineMinSize", OPT_InlineMinSize, OPT_TYPE_VALUE, "minimum size for inlined result" },
+#endif
+#endif
+ { "PrintConfig", OPT_PrintConfig, OPT_TYPE_BOOLEAN, "print VM configuration" },
+ { "PrintWarnings", OPT_PrintWarnings, OPT_TYPE_BOOLEAN, "print warnings about suspicious behavior"},
+ { "ProfileGCMemoryUsage", OPT_ProfileGCMemoryUsage, OPT_TYPE_VALUE, "profiles GC memory usage in the given interval, <value> is in seconds (default: 5)" },
+ { "ProfileMemoryUsage", OPT_ProfileMemoryUsage, OPT_TYPE_VALUE, "TODO" },
+ { "ProfileMemoryUsageGNUPlot", OPT_ProfileMemoryUsageGNUPlot, OPT_TYPE_VALUE, "TODO" },
+ { "RegallocSpillAll", OPT_RegallocSpillAll, OPT_TYPE_BOOLEAN, "spill all variables to the stack" },
+#if defined(ENABLE_REPLACEMENT)
+ { "TestReplacement", OPT_TestReplacement, OPT_TYPE_BOOLEAN, "activate all replacement points during code generation" },
+#endif
+ { "TraceBuiltinCalls", OPT_TraceBuiltinCalls, OPT_TYPE_BOOLEAN, "trace calls to VM builtin functions" },
+ { "TraceCompilerCalls", OPT_TraceCompilerCalls, OPT_TYPE_BOOLEAN, "trace JIT compiler calls" },
+ { "TraceExceptions", OPT_TraceExceptions, OPT_TYPE_BOOLEAN, "trace Exception throwing" },
+ { "TraceHPI", OPT_TraceHPI, OPT_TYPE_BOOLEAN, "Trace Host Porting Interface (HPI)" },
+#if defined(ENABLE_INLINING) && !defined(NDEBUG)
+ { "TraceInlining", OPT_TraceInlining, OPT_TYPE_VALUE, "trace method inlining with the given verbosity level (default: 1)" },
+#endif
+#if !defined(ENABLE_VMLOG)
+ { "TraceJavaCalls", OPT_TraceJavaCalls, OPT_TYPE_BOOLEAN, "trace Java method calls" },
+#endif
+ { "TraceJMMCalls", OPT_TraceJMMCalls, OPT_TYPE_BOOLEAN, "trace JMM method calls" },
+ { "TraceJNICalls", OPT_TraceJNICalls, OPT_TYPE_BOOLEAN, "trace JNI method calls" },
+ { "TraceJVMCalls", OPT_TraceJVMCalls, OPT_TYPE_BOOLEAN, "trace JVM method calls but omit very frequent ones" },
+ { "TraceJVMCallsVerbose", OPT_TraceJVMCallsVerbose, OPT_TYPE_BOOLEAN, "trace all JVM method calls" },
+#if defined(ENABLE_JVMTI)
+ { "TraceJVMTICalls", OPT_TraceJVMTICalls, OPT_TYPE_BOOLEAN, "trace JVMTI method calls" },
+#endif
+ { "TraceLinkClass", OPT_TraceLinkClass, OPT_TYPE_BOOLEAN, "trace class linking" },
+#if defined(ENABLE_REPLACEMENT)
+ { "TraceReplacement", OPT_TraceReplacement, OPT_TYPE_VALUE, "trace on-stack replacement with the given verbosity level (default: 1)" },
+#endif
+ { "TraceSubsystemInitialization", OPT_TraceSubsystemInitialization, OPT_TYPE_BOOLEAN, "trace initialization of subsystems" },
+ { "TraceTraps", OPT_TraceTraps, OPT_TYPE_BOOLEAN, "trace traps generated by JIT code" },
+#if defined(ENABLE_VMLOG)
+ { "Vmlog", OPT_Vmlog, OPT_TYPE_VALUE, "prefix for vmlog trace files (enables vmlog)" },
+ { "VmlogStrings", OPT_VmlogStrings, OPT_TYPE_VALUE, "prefix of vmlog string file to load" },
+ { "VmlogIgnore", OPT_VmlogIgnore, OPT_TYPE_VALUE, "prefix of vmlog ignore file to load" },
+#endif
+
+ /* end marker */
+
+ { NULL, -1, -1, NULL }
+};
+
+
+/* options_get *****************************************************************