dd319945c81ad9b7b4b0172543577a0b0f13d5d7
[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    $Id: options.h 8236 2007-07-27 10:18:17Z twisti $
26
27 */
28
29
30 #ifndef _OPTIONS_H
31 #define _OPTIONS_H
32
33
34 #include "config.h"
35
36 #include <stdint.h>
37
38 #include "vm/types.h"
39
40 #include "native/jni.h"
41
42 #include "vm/global.h"
43
44
45 /* reserved option numbers ****************************************************/
46
47 /* define these negative since the other options are an enum */
48
49 #define OPT_DONE       -1
50 #define OPT_ERROR      -2
51 #define OPT_IGNORE     -3
52
53
54 typedef struct opt_struct opt_struct;
55
56 struct opt_struct {
57         char *name;
58         bool  arg;
59         int   value;
60 };
61
62
63 typedef struct option_t option_t;
64
65 struct option_t {
66         char *name;
67         int   value;
68         int   type;
69         char *doc;
70 };
71
72
73 /* global variables ***********************************************************/
74
75 extern s4    opt_index;
76 extern char *opt_arg;
77
78 extern bool opt_foo;
79
80 extern bool opt_jit;
81 extern bool opt_intrp;
82
83 extern bool opt_jar;
84 extern bool opt_run;
85
86 extern s4   opt_heapmaxsize;
87 extern s4   opt_heapstartsize;
88 extern s4   opt_stacksize;
89
90 extern bool opt_verbose;
91 extern bool opt_debugcolor;
92 extern bool compileall;
93
94 extern bool loadverbose;         /* Print debug messages during loading */
95 extern bool linkverbose;
96 extern bool initverbose;         /* Log class initialization */ 
97
98 extern bool opt_verboseclass;
99 extern bool opt_verbosegc;
100 extern bool opt_verbosejni;
101 extern bool opt_verbosecall;
102 extern bool opt_verbosethreads;
103
104 extern bool showmethods;
105 extern bool showconstantpool;
106 extern bool showutf;
107
108 extern char *opt_method;
109 extern char *opt_signature;
110
111 extern bool compileverbose;
112 extern bool showstack;
113
114 extern bool opt_showdisassemble;
115 extern bool opt_shownops;
116 extern bool opt_showddatasegment;
117 extern bool opt_showintermediate;
118 extern bool opt_showexceptionstubs;
119 extern bool opt_shownativestub;
120
121 extern bool checkbounds;
122 extern bool opt_noieee;
123 extern bool checksync;
124 #if defined(ENABLE_LOOP)
125 extern bool opt_loops;
126 #endif
127
128 extern bool makeinitializations;
129
130 #if defined(ENABLE_STATISTICS)
131 extern bool opt_stat;
132 extern bool opt_getloadingtime;
133 extern bool opt_getcompilingtime;
134 #endif
135 #if defined(ENABLE_VERIFIER)
136 extern bool opt_verify;
137 #endif
138
139 #if defined(ENABLE_PROFILING)
140 extern bool opt_prof;
141 extern bool opt_prof_bb;
142 #endif
143
144 /* inlining options ***********************************************************/
145
146 #if defined(ENABLE_INLINING)
147 extern bool opt_inlining;
148 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
149 extern s4 opt_inline_debug_min_size;
150 extern s4 opt_inline_debug_max_size;
151 extern s4 opt_inline_debug_end_counter;
152 extern bool opt_inline_debug_all;
153 #endif /* defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG) */
154 #if !defined(NDEBUG)
155 extern bool opt_inline_debug_log;
156 #endif /* !defined(NDEBUG) */
157 #endif /* defined(ENABLE_INLINING) */
158
159
160 /* optimization options *******************************************************/
161
162 #if defined(ENABLE_IFCONV)
163 extern bool opt_ifconv;
164 #endif
165
166 #if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
167 extern bool opt_lsra;
168 #endif
169
170
171 /* interpreter options ********************************************************/
172
173 #if defined(ENABLE_INTRP)
174 extern bool opt_no_dynamic;
175 extern bool opt_no_replication;
176 extern bool opt_no_quicksuper;
177
178 extern s4   opt_static_supers;
179 extern bool vm_debug;
180 #endif
181
182 /* debug output filtering options *********************************************/
183
184 #if defined(ENABLE_DEBUG_FILTER)
185 extern const char *opt_filter_verbosecall_include;
186 extern const char *opt_filter_verbosecall_exclude;
187 extern const char *opt_filter_show_method;
188 #endif
189
190
191 /* -XX options ****************************************************************/
192
193 /* NOTE: For better readability keep these alpha-sorted. */
194
195 extern int32_t  opt_DebugStackFrameInfo;
196 extern int32_t  opt_DebugStackTrace;
197 extern int32_t  opt_MaxPermSize;
198 extern int32_t  opt_PermSize;
199 extern int      opt_PrintConfig;
200 extern int32_t  opt_ProfileGCMemoryUsage;
201 extern int32_t  opt_ProfileMemoryUsage;
202 extern FILE    *opt_ProfileMemoryUsageGNUPlot;
203 extern int32_t  opt_ThreadStackSize;
204 extern int32_t  opt_TraceExceptions;
205 extern int32_t  opt_TraceJavaCalls;
206 extern int32_t  opt_TraceJNICalls;
207 extern int32_t  opt_TraceJVMCalls;
208 #if defined(ENABLE_REPLACEMENT)
209 extern int32_t  opt_TraceReplacement;
210 #endif
211
212
213 /* function prototypes ********************************************************/
214
215 s4   options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
216 void options_xx(const char *name);
217
218 #endif /* _OPTIONS_H */
219
220
221 /*
222  * These are local overrides for various environment variables in Emacs.
223  * Please do not remove this and leave it at the end of the file, where
224  * Emacs will automagically detect them.
225  * ---------------------------------------------------------------------
226  * Local variables:
227  * mode: c
228  * indent-tabs-mode: t
229  * c-basic-offset: 4
230  * tab-width: 4
231  * End:
232  */