* configure.ac (AC_CHECK_HEADERS): Added sys/socket.h.
[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 8123 2007-06-20 23:50:55Z michi $
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         int32_t  option;
68         char    *doc;
69 };
70
71
72 /* global variables ***********************************************************/
73
74 extern s4    opt_index;
75 extern char *opt_arg;
76
77 extern bool opt_foo;
78
79 extern bool opt_jit;
80 extern bool opt_intrp;
81
82 extern bool opt_jar;
83 extern bool opt_run;
84
85 extern s4   opt_heapmaxsize;
86 extern s4   opt_heapstartsize;
87 extern s4   opt_stacksize;
88
89 extern bool opt_verbose;
90 extern bool opt_debugcolor;
91 extern bool compileall;
92
93 extern bool loadverbose;         /* Print debug messages during loading */
94 extern bool linkverbose;
95 extern bool initverbose;         /* Log class initialization */ 
96
97 extern bool opt_verboseclass;
98 extern bool opt_verbosegc;
99 extern bool opt_verbosejni;
100 extern bool opt_verbosecall;
101 extern bool opt_verbosethreads;
102
103 extern bool showmethods;
104 extern bool showconstantpool;
105 extern bool showutf;
106
107 extern char *opt_method;
108 extern char *opt_signature;
109
110 extern bool compileverbose;
111 extern bool showstack;
112
113 extern bool opt_showdisassemble;
114 extern bool opt_shownops;
115 extern bool opt_showddatasegment;
116 extern bool opt_showintermediate;
117 extern bool opt_showexceptionstubs;
118 extern bool opt_shownativestub;
119
120 extern bool checkbounds;
121 extern bool opt_noieee;
122 extern bool checksync;
123 #if defined(ENABLE_LOOP)
124 extern bool opt_loops;
125 #endif
126
127 extern bool makeinitializations;
128
129 #if defined(ENABLE_STATISTICS)
130 extern bool opt_stat;
131 extern bool opt_getloadingtime;
132 extern bool opt_getcompilingtime;
133 #endif
134 #if defined(ENABLE_VERIFIER)
135 extern bool opt_verify;
136 #endif
137 extern bool opt_eager;
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_replace_verbose;
150 extern s4 opt_inline_debug_min_size;
151 extern s4 opt_inline_debug_max_size;
152 extern s4 opt_inline_debug_end_counter;
153 extern bool opt_inline_debug_all;
154 #endif /* defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG) */
155 #if !defined(NDEBUG)
156 extern bool opt_inline_debug_log;
157 #endif /* !defined(NDEBUG) */
158 #endif /* defined(ENABLE_INLINING) */
159
160
161 /* optimization options *******************************************************/
162
163 #if defined(ENABLE_IFCONV)
164 extern bool opt_ifconv;
165 #endif
166
167 #if defined(ENABLE_LSRA) || defined(ENABLE_SSA)
168 extern bool opt_lsra;
169 #endif
170
171
172 /* interpreter options ********************************************************/
173
174 #if defined(ENABLE_INTRP)
175 extern bool opt_no_dynamic;
176 extern bool opt_no_replication;
177 extern bool opt_no_quicksuper;
178
179 extern s4   opt_static_supers;
180 extern bool vm_debug;
181 #endif
182
183 /* debug output filtering options *********************************************/
184
185 #if defined(ENABLE_DEBUG_FILTER)
186 extern const char *opt_filter_verbosecall_include;
187 extern const char *opt_filter_verbosecall_exclude;
188 extern const char *opt_filter_show_method;
189 #endif
190
191
192 /* -XX options ****************************************************************/
193
194 /* NOTE: For better readability keep these alpha-sorted. */
195
196 extern int32_t  opt_ProfileGCMemoryUsage;
197 extern int32_t  opt_ProfileMemoryUsage;
198 extern FILE    *opt_ProfileMemoryUsageGNUPlot;
199 extern int32_t  opt_TraceExceptions;
200 #if defined(ENABLE_REPLACEMENT)
201 extern int32_t  opt_TraceReplacement;
202 #endif
203
204
205 /* function prototypes ********************************************************/
206
207 s4   options_get(opt_struct *opts, JavaVMInitArgs *vm_args);
208 void options_xx(const char *name);
209
210 #endif /* _OPTIONS_H */
211
212
213 /*
214  * These are local overrides for various environment variables in Emacs.
215  * Please do not remove this and leave it at the end of the file, where
216  * Emacs will automagically detect them.
217  * ---------------------------------------------------------------------
218  * Local variables:
219  * mode: c
220  * indent-tabs-mode: t
221  * c-basic-offset: 4
222  * tab-width: 4
223  * End:
224  */