* Removed all Id tags.
[cacao.git] / src / vmcore / options.h
1 /* src/vmcore/options.h - define global options extern
2
3    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25 */
26
27
28 #ifndef _OPTIONS_H
29 #define _OPTIONS_H
30
31
32 #include "config.h"
33
34 #include <stdint.h>
35
36 #include "vm/types.h"
37
38 #include "native/jni.h"
39
40 #include "vm/global.h"
41
42
43 /* reserved option numbers ****************************************************/
44
45 /* define these negative since the other options are an enum */
46
47 #define OPT_DONE       -1
48 #define OPT_ERROR      -2
49 #define OPT_IGNORE     -3
50
51
52 typedef struct opt_struct opt_struct;
53
54 struct opt_struct {
55         char *name;
56         bool  arg;
57         int   value;
58 };
59
60
61 typedef struct option_t option_t;
62
63 struct option_t {
64         char *name;
65         int   value;
66         int   type;
67         char *doc;
68 };
69
70
71 /* global variables ***********************************************************/
72
73 extern s4    opt_index;
74 extern char *opt_arg;
75
76 extern bool opt_foo;
77
78 extern bool opt_jit;
79 extern bool opt_intrp;
80
81 extern bool opt_jar;
82 extern bool opt_run;
83
84 extern s4   opt_heapmaxsize;
85 extern s4   opt_heapstartsize;
86 extern s4   opt_stacksize;
87
88 extern bool opt_verbose;
89 extern bool opt_debugcolor;
90 extern bool compileall;
91
92 extern bool loadverbose;         /* Print debug messages during loading */
93 extern bool linkverbose;
94 extern bool initverbose;         /* Log class initialization */ 
95
96 extern bool opt_verboseclass;
97 extern bool opt_verbosegc;
98 extern bool opt_verbosejni;
99 extern bool opt_verbosecall;
100 extern bool opt_verbosethreads;
101
102 extern bool showmethods;
103 extern bool showconstantpool;
104 extern bool showutf;
105
106 extern char *opt_method;
107 extern char *opt_signature;
108
109 extern bool compileverbose;
110 extern bool showstack;
111
112 extern bool opt_showdisassemble;
113 extern bool opt_shownops;
114 extern bool opt_showddatasegment;
115 extern bool opt_showintermediate;
116 extern bool opt_showexceptionstubs;
117 extern bool opt_shownativestub;
118
119 extern bool checkbounds;
120 extern bool opt_noieee;
121 extern bool checksync;
122 #if defined(ENABLE_LOOP)
123 extern bool opt_loops;
124 #endif
125
126 extern bool makeinitializations;
127
128 #if defined(ENABLE_STATISTICS)
129 extern bool opt_stat;
130 extern bool opt_getloadingtime;
131 extern bool opt_getcompilingtime;
132 #endif
133 #if defined(ENABLE_VERIFIER)
134 extern bool opt_verify;
135 #endif
136
137 #if defined(ENABLE_PROFILING)
138 extern bool opt_prof;
139 extern bool opt_prof_bb;
140 #endif
141
142 /* inlining options ***********************************************************/
143
144 #if defined(ENABLE_INLINING)
145 extern bool opt_inlining;
146 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
147 extern s4 opt_inline_debug_min_size;
148 extern s4 opt_inline_debug_max_size;
149 extern s4 opt_inline_debug_end_counter;
150 extern bool opt_inline_debug_all;
151 #endif /* defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG) */
152 #if !defined(NDEBUG)
153 extern bool opt_inline_debug_log;
154 #endif /* !defined(NDEBUG) */
155 #endif /* defined(ENABLE_INLINING) */
156
157
158 /* optimization options *******************************************************/
159
160 #if defined(ENABLE_IFCONV)
161 extern bool opt_ifconv;
162 #endif
163
164 #if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
165 extern bool opt_lsra;
166 #endif
167
168
169 /* interpreter options ********************************************************/
170
171 #if defined(ENABLE_INTRP)
172 extern bool opt_no_dynamic;
173 extern bool opt_no_replication;
174 extern bool opt_no_quicksuper;
175
176 extern s4   opt_static_supers;
177 extern bool vm_debug;
178 #endif
179
180 /* debug output filtering options *********************************************/
181
182 #if defined(ENABLE_DEBUG_FILTER)
183 extern const char *opt_filter_verbosecall_include;
184 extern const char *opt_filter_verbosecall_exclude;
185 extern const char *opt_filter_show_method;
186 #endif
187
188
189 /* -XX options ****************************************************************/
190
191 /* NOTE: For better readability keep these alpha-sorted. */
192
193 extern int32_t  opt_DebugStackFrameInfo;
194 extern int32_t  opt_DebugStackTrace;
195 extern int32_t  opt_MaxPermSize;
196 extern int32_t  opt_PermSize;
197 extern int      opt_PrintConfig;
198 extern int32_t  opt_ProfileGCMemoryUsage;
199 extern int32_t  opt_ProfileMemoryUsage;
200 extern FILE    *opt_ProfileMemoryUsageGNUPlot;
201 extern int32_t  opt_ThreadStackSize;
202 extern int32_t  opt_TraceExceptions;
203 extern int32_t  opt_TraceJavaCalls;
204 extern int32_t  opt_TraceJNICalls;
205 extern int32_t  opt_TraceJVMCalls;
206 #if defined(ENABLE_REPLACEMENT)
207 extern int32_t  opt_TraceReplacement;
208 #endif
209
210
211 /* function prototypes ********************************************************/
212
213 s4   options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
214 void options_xx(const char *name);
215
216 #endif /* _OPTIONS_H */
217
218
219 /*
220  * These are local overrides for various environment variables in Emacs.
221  * Please do not remove this and leave it at the end of the file, where
222  * Emacs will automagically detect them.
223  * ---------------------------------------------------------------------
224  * Local variables:
225  * mode: c
226  * indent-tabs-mode: t
227  * c-basic-offset: 4
228  * tab-width: 4
229  * End:
230  */