Documented --version.
[mono.git] / man / mono.1
1 .\" 
2 .\" mini manual page.
3 .\" (C) 2003 Ximian, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"
7 .TH Mono "Mono 1.0"
8 .SH NAME
9 mini \- Mono new's code ECMA-CLI code generator (Just-in-Time and Ahead-of-Time)
10 .SH SYNOPSIS
11 .PP
12 .B mini
13 [\-\-aot]
14 [\-\-break METHOD] 
15 [\-\-breakonex]
16 [\-\-compile name] 
17 [\-\-compileall] 
18 [\-\-config filename]
19 [\-\-coverage]
20 [\-\-debug] 
21 [\-\-graph[=TYPE] METHOD]
22 [\-\-help] 
23 [\-\-trace]
24 [\-\-ncompile num]  
25 [\-\-optimize=MODE]
26 [\-O=mode]
27 [\-\-profile]
28 [\-\-regression]
29 [\-\-statfile FILE]
30 [\-v]
31 [\-\-verbose]
32 [\-V]
33 [\-\-version]
34 file [arguments...]
35 .SH DESCRIPTION
36 The \fImini\fP program is a runtime implementation of the ECMA Common
37 Language Infrastructure.  The runtime contains a native code generator
38 that transforms the Common Intermediate Language into native code.
39 .PP
40 The code generator can operate in two modes: just in time compilation
41 (JIT) or ahead of time compilation (AOT).  Since code can be
42 dynamically loaded, the runtime environment and the JIT are always
43 present, even if code is compiled ahead of time.  
44 .PP
45 The runtime loads ths specified
46 .I file
47 and optionally passes
48 the
49 .I arguments
50 to it.  The 
51 .I file
52 is an ECMA assembly.  They typically have a .exe or .dll extension.
53 .PP
54 The runtime provides a number of configuration options for running
55 applications, for developping and debugging, and for testing and
56 debugging the runtime itself.
57 .SH RUNTIME OPTIONS
58 .TP
59 .I "--aot"
60 This option is used to precompile the CIL code in the specified
61 assembly to native code.  The generated code is stored in a file with
62 the extension .so.  This file will be automatically picked up by the
63 runtime when the assembly is executed.  
64 .TP
65 This pre-compiles the methods, but the original assembly is still
66 required to execute as this one contains the metadata and exception
67 information which is not availble on the generated file.  When
68 precompiling code, you might want to compile with all optimizations
69 (-O=all).  Pre-compiled code is position independent code.
70 .TP
71 Pre compilation is just a mechanism to reduce startup time, and avoid
72 just-in-time compilation costs.  The original assembly must still be
73 present, as the metadata is contained there.
74 .TP
75 .I "--config filename"
76 Load the specified configuration file instead of the default one(s).
77 The default files are /etc/mono/config and ~/.mono/config or the file
78 specified in the MONO_CONFIG environment variable, if set.  See the
79 mono-config(5) man page for details on the format of this file.
80 .TP
81 .I "--help", "-h"
82 Displays usage instructions.
83 .TP
84 .I "--optimize=MODE", "-O=mode"
85 MODE is a comma separated list of optimizations.  They also allow
86 optimizations to be turned off by prefixing the optimization name with
87 a minus sign.
88 .TP
89 The following optimizations are implemented:
90 .nf
91              peephole   Peephole postpass
92              branch     Branch optimizations
93              inline     Inline method calls
94              cfold      Constant folding
95              consprop   Constant propagation
96              copyprop   Copy propagation
97              deadce     Dead code elimination
98              linears    Linear scan global reg allocation
99              cmov       Conditional moves
100              shared     Emit per-domain code
101              sched      Instruction scheduling
102              instrins   Intrinsic method implementations
103              tailc      Tail recursion and tail calls
104              loop       Loop related optimizations
105 .fi
106 .TP
107 For example, to enable all the optimization but dead code
108 elimination and inlining, you can use:
109 .nf
110         -O=all,-deadce,-inline
111 .fi
112
113 .SH DEVELOPMENT OPTIONS
114 .I "--break method"
115 Inserts a breakpoint before the method whose name is `method'
116 (namespace.class:methodname).  Use `Main' as method name to insert a
117 breakpoint on the application's main method.
118 .TP
119 .I "--breakonex"
120 Inserts a breakpoint on exceptions.  This allows you to debug your
121 application with a native debugger when an exception is thrown.
122 .TP
123 .I "--coverage"
124 Performs coverage analysis on the underlying IL code.
125 .TP
126 .I "--trace"
127 Shows method names as they are invoked.
128
129
130
131 .SH DEVELOPMENT OPTIONS
132 The following options are used to debug a JITed application.  They're
133 only useful when running the JIT in a debugger:
134 .TP
135 .I "--debug"
136 Turns on the debugging mode in the runtime.  If an assembly was
137 compiled with debugging information, it will produce line number
138 information for stack traces. 
139 .TP
140 .I "--profile"
141 Instructs the runtime to collect profiling information about execution
142 times and memory allocation, and dump it at the end of the execution.
143
144
145
146 .SH MAINTAINER OPTIONS
147 The maintainer options are only used by those developing the runtime
148 itself, and not typically of interest to runtime users or developers.
149 .TP
150 .I "--compile name"
151 This compiles a method (namespace.name:methodname), this is used for
152 testing the compiler performance or to examine the output of the code
153 generator. 
154 .TP
155 .I "--compileall"
156 Compiles all the methods in an assembly.  This is used to test the
157 compiler performance or to examine the output of the code generator
158 .TP 
159 .I "--graph=TYPE METHOD"
160 This generates a postscript file with a graph with the details about
161 the specified method (namespace.name:methodname).  This requires `dot'
162 and ghostview to be installed (it expects Ghostview to be called
163 "gv"). 
164 .TP
165 The following graphs are available:
166 .nf
167           cfg        Control Flow Graph (CFG)
168           dtree      Dominator Tree
169           code       CFG showing code
170           ssa        CFG showing code after SSA translation
171           optcode    CFG showing code after IR optimizations
172 .fi
173 Some graphs will only be available if certain optimizations are turned
174 on.
175 .TP
176 .I "--ncompile"
177 Instruct the runtime on the number of times that the method specified
178 by --compile (or all the methods if --compileall is used) to be
179 compiled.  This is used for testing the code generator performance. 
180 .TP
181 .I "-v", "--verbose"
182 Increases the verbosity level, each time it is listed, increases the
183 verbosity level to include more information.
184 .TP
185 .I "-V", "--version"
186 Prints JIT version information.
187
188
189 .SH ENVIRONMENT VARIABLES
190 .TP
191 .I "GC_DONT_GC"
192 Turns off the garbage collection in Mono.  This should be only used
193 for debugging purposes
194 .TP
195 .I "MONO_PATH"
196 Provides a search path to mono and mint where to look for library files.
197 Directories are separated by the platform path separator (colons on unix). Example:
198 .B /home/username/lib:/usr/local/mono/lib
199 .TP
200 .I "MONO_DISABLE_SHM"
201 If this variable is set, it disables the Windows I/O Emulation layer,
202 and handles (files, events, mutexes, pipes) will not be shared across
203 processes.  This option is only available on Unix.
204 .TP
205 .I "MONO_CFG_DIR"
206 If set, this variable overrides the default system configuration directory
207 ($PREFIX/etc). It's used to locate machine.config file.
208 .TP
209 .I "MONO_CONFIG"
210 If set, this variable overrides the default runtime configuration file
211 ($PREFIX/etc/mono/config). The --config command line options overrides the
212 environment variable.
213 .SH FILES
214 On Unix assemblies are loaded from the installation lib directory.  If you set
215 `prefix' to /usr, the assemblies will be located in /usr/lib.  On
216 Windows, the assemblies are loaded from the directory where mono and
217 mint live.
218 .PP
219 /etc/mono/config, ~/.mono/config
220 .IP
221 Mono runtime configuration file.  See the mono-config(5) manual page
222 for more information.
223 .SH MAILING LISTS
224 Visit http://mail.ximian.com/mailman/mono-list for details.
225 .SH WEB SITE
226 Visit: http://www.go-mono.com for details
227 .SH SEE ALSO
228 .BR mcs(1), mint(1), monodis(1), mono-config(5)
229
230