-/* options.h - define global options extern
+/* src/vm/options.h - define global options extern
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Institut f. Computersprachen, TU Wien
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
- S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
- J. Wenninger
+ Copyright (C) 1996-2005, 2006, 2007, 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
- Contact: cacao@complang.tuwien.ac.at
-
- Authors: Christian Thalinger
-
- $Id: options.h 1223 2004-06-30 19:13:00Z twisti $
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
*/
#ifndef _OPTIONS_H
#define _OPTIONS_H
+#include "config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#include "vm/types.h"
+
+#include "native/jni.hpp"
+
+#include "vm/global.h"
+
+
+/* reserved option numbers ****************************************************/
+
+/* define these negative since the other options are an enum */
+
+#define OPT_DONE -1
+#define OPT_ERROR -2
+#define OPT_IGNORE -3
-#include "global.h"
+typedef struct opt_struct opt_struct;
-/* global variables */
+struct opt_struct {
+ const char *name;
+ bool arg;
+ int value;
+};
-extern bool compileall;
-extern bool verbose;
-extern bool runverbose;
-extern bool verboseexception;
-extern bool collectverbose;
+
+typedef struct option_t option_t;
+
+struct option_t {
+ const char *name;
+ int value;
+ int type;
+ const char *doc;
+};
+
+
+/* global variables ***********************************************************/
+
+extern s4 opt_index;
+extern char *opt_arg;
+
+extern bool opt_foo;
+
+extern bool opt_jit;
+extern bool opt_intrp;
+
+extern bool opt_jar;
+extern bool opt_run;
+
+extern s4 opt_heapmaxsize;
+extern s4 opt_heapstartsize;
+extern s4 opt_stacksize;
+
+extern bool opt_verbose;
+extern bool opt_debugcolor;
extern bool loadverbose; /* Print debug messages during loading */
-extern bool linkverbose;
extern bool initverbose; /* Log class initialization */
-extern bool opt_rt;
-extern bool opt_xta;
-extern bool opt_vta;
-
-extern bool opt_liberalutf; /* Don't check overlong UTF-8 sequences */
+extern bool opt_verboseclass;
+extern bool opt_verbosegc;
+extern bool opt_verbosejni;
+extern bool opt_verbosecall;
extern bool showmethods;
extern bool showconstantpool;
extern bool compileverbose;
extern bool showstack;
-extern bool showdisassemble;
-extern bool showddatasegment;
-extern bool showintermediate;
-extern bool useinlining;
-extern bool inlinevirtuals;
-extern bool inlineexceptions;
-extern bool inlineparamopt;
-extern bool inlineoutsiders;
+extern bool opt_showdisassemble;
+extern bool opt_showddatasegment;
+extern bool opt_showintermediate;
extern bool checkbounds;
-extern bool checknull;
-extern bool opt_noieee;
extern bool checksync;
+#if defined(ENABLE_LOOP)
extern bool opt_loops;
+#endif
extern bool makeinitializations;
-extern bool getloadingtime;
-extern s8 loadingtime;
+#if defined(ENABLE_STATISTICS)
+extern bool opt_stat;
+extern bool opt_getloadingtime;
+extern bool opt_getcompilingtime;
+#endif
+#if defined(ENABLE_VERIFIER)
+extern bool opt_verify;
+#endif
-extern bool getcompilingtime;
-extern s8 compilingtime;
+#if defined(ENABLE_PROFILING)
+extern bool opt_prof;
+extern bool opt_prof_bb;
+#endif
-extern int has_ext_instr_set;
+/* optimization options *******************************************************/
-extern bool opt_stat;
-extern bool opt_verify;
-extern bool opt_eager;
+#if defined(ENABLE_IFCONV)
+extern bool opt_ifconv;
+#endif
+
+#if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
+extern bool opt_lsra;
+#endif
+#if defined(ENABLE_SSA)
+extern bool opt_ssa_dce; /* enable dead code elemination */
+extern bool opt_ssa_cp; /* enable copy propagation */
+#endif
+
+/* interpreter options ********************************************************/
+
+#if defined(ENABLE_INTRP)
+extern bool opt_no_dynamic;
+extern bool opt_no_replication;
+extern bool opt_no_quicksuper;
+
+extern s4 opt_static_supers;
+extern bool vm_debug;
+#endif
+
+/* debug output filtering options *********************************************/
+
+#if defined(ENABLE_DEBUG_FILTER)
+extern const char *opt_filter_verbosecall_include;
+extern const char *opt_filter_verbosecall_exclude;
+extern const char *opt_filter_show_method;
+#endif
+
+
+/* -XX options ****************************************************************/
+
+/* NOTE: For better readability keep these alpha-sorted. */
+
+/* Options which must always be available (production options in
+ HotSpot). */
+
+extern int64_t opt_MaxDirectMemorySize;
+extern int opt_MaxPermSize;
+extern int opt_PermSize;
+extern int opt_ThreadStackSize;
+
+/* Debugging options which can be turned off. */
+
+extern bool opt_AlwaysEmitLongBranches;
+extern int opt_CompileAll;
+extern char* opt_CompileMethod;
+extern char* opt_CompileSignature;
+extern int opt_DebugExceptions;
+extern int opt_DebugFinalizer;
+extern int opt_DebugLocalReferences;
+extern int opt_DebugLocks;
+extern int opt_DebugPatcher;
+extern int opt_DebugPackage;
+extern int opt_DebugProperties;
+extern int opt_DebugStackFrameInfo;
+extern int opt_DebugStackTrace;
+extern int opt_DebugThreads;
+#if defined(ENABLE_DISASSEMBLER)
+extern int opt_DisassembleStubs;
+#endif
+#if defined(ENABLE_OPAGENT)
+extern int opt_EnableOpagent;
+#endif
+#if defined(ENABLE_GC_CACAO)
+extern int opt_GCDebugRootSet;
+extern int opt_GCStress;
+#endif
+#if defined(ENABLE_INLINING)
+extern int opt_Inline;
+#if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
+extern int opt_InlineAll;
+extern int opt_InlineCount;
+extern int opt_InlineMaxSize;
+extern int opt_InlineMinSize;
+#endif
+#endif
+extern int opt_PrintConfig;
+extern int opt_PrintWarnings;
+extern int opt_ProfileGCMemoryUsage;
+extern int opt_ProfileMemoryUsage;
+extern FILE *opt_ProfileMemoryUsageGNUPlot;
+extern int opt_RegallocSpillAll;
+#if defined(ENABLE_REPLACEMENT)
+extern int opt_TestReplacement;
+#endif
+extern int opt_TraceCompilerCalls;
+extern int opt_TraceExceptions;
+extern int opt_TraceHPI;
+#if defined(ENABLE_INLINING) && !defined(NDEBUG)
+extern int opt_TraceInlining;
+#endif
+extern int opt_TraceJavaCalls;
+extern int opt_TraceJNICalls;
+extern int opt_TraceJVMCalls;
+extern int opt_TraceJVMCallsVerbose;
+extern int opt_TraceLinkClass;
+#if defined(ENABLE_REPLACEMENT)
+extern int opt_TraceReplacement;
+#endif
+extern int opt_TraceSubsystemInitialization;
+extern int opt_TraceTraps;
+
+
+/* function prototypes ********************************************************/
+
+int options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
+void options_xx(JavaVMInitArgs *vm_args);
+
+
+/* debug **********************************************************************/
+
+#if !defined(NDEBUG)
+# define TRACESUBSYSTEMINITIALIZATION(text) \
+ do { \
+ if (opt_TraceSubsystemInitialization) { \
+ log_println("[Initializing subsystem: %s]", text); \
+ } \
+ } while (0)
+#else
+# define TRACESUBSYSTEMINITIALIZATION(text)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _OPTIONS_H */