Mono(Mono 1.0)

NAME
mono - Mono's code ECMA-CLI code generator (Just-in-Time and Ahead-of-Time)

SYNOPSIS

mono [options] file [arguments...]

DESCRIPTION
mono is a runtime implementation of the ECMA Common Language Infrastructure. This can be used to run ECMA and .NET applications.

The runtime contains a native code generator that transforms the Common Intermediate Language into native code.

The code generator can operate in two modes: just in time compilation (JIT) or ahead of time compilation (AOT). Since code can be dynamically loaded, the runtime environment and the JIT are always present, even if code is compiled ahead of time.

The runtime loads ths specified file and optionally passes the arguments to it. The file is an ECMA assembly. They typically have a .exe or .dll extension.

The runtime provides a number of configuration options for running applications, for developping and debugging, and for testing and debugging the runtime itself.

RUNTIME OPTIONS
The following options are available:

--aot
    This option is used to precompile the CIL code in the specified assembly to native code. The generated code is stored in a file with the extension .so. This file will be automatically picked up by the runtime when the assembly is executed.

    This pre-compiles the methods, but the original assembly is still required to execute as this one contains the metadata and exception information which is not availble on the generated file. When precompiling code, you might want to compile with all optimizations (-O=all). Pre-compiled code is position independent code.

    Pre compilation is just a mechanism to reduce startup time, and avoid just-in-time compilation costs. The original assembly must still be present, as the metadata is contained there.

--config filename
    Load the specified configuration file instead of the default one(s). The default files are /etc/mono/config and ~/.mono/config or the file specified in the MONO_CONFIG environment variable, if set. See the mono-config(5) man page for details on the format of this file.

--help , -h
    Displays usage instructions.

--optimize=MODE , -O=mode
    MODE is a comma separated list of optimizations. They also allow optimizations to be turned off by prefixing the optimization name with a minus sign.

    The following optimizations are implemented:
                 all        Turn on all optimizations
                 peephole   Peephole postpass
                 branch     Branch optimizations
                 inline     Inline method calls
                 cfold      Constant folding
                 consprop   Constant propagation
                 copyprop   Copy propagation
                 deadce     Dead code elimination
                 linears    Linear scan global reg allocation
                 cmov       Conditional moves
                 shared     Emit per-domain code
                 sched      Instruction scheduling
                 instrins   Intrinsic method implementations
                 tailc      Tail recursion and tail calls
                 loop       Loop related optimizations

    For example, to enable all the optimization but dead code elimination and inlining, you can use:
    	-O=all,-deadce,-inline

DEVELOPMENT OPTIONS

--break method
    Inserts a breakpoint before the method whose name is `method' (namespace.class:methodname). Use `Main' as method name to insert a breakpoint on the application's main method.

--breakonex
    Inserts a breakpoint on exceptions. This allows you to debug your application with a native debugger when an exception is thrown.

--coverage
    Performs coverage analysis on the underlying IL code.

--trace
    Shows method names as they are invoked.

DEVELOPMENT OPTIONS
The following options are used to debug a JITed application. They're only useful when running the JIT in a debugger:

--debug
    Turns on the debugging mode in the runtime. If an assembly was compiled with debugging information, it will produce line number information for stack traces.

--profile
    Instructs the runtime to collect profiling information about execution times and memory allocation, and dump it at the end of the execution.

MAINTAINER OPTIONS
The maintainer options are only used by those developing the runtime itself, and not typically of interest to runtime users or developers.

--compile name
    This compiles a method (namespace.name:methodname), this is used for testing the compiler performance or to examine the output of the code generator.

--compileall
    Compiles all the methods in an assembly. This is used to test the compiler performance or to examine the output of the code generator

--graph=TYPE METHOD
    This generates a postscript file with a graph with the details about the specified method (namespace.name:methodname). This requires `dot' and ghostview to be installed (it expects Ghostview to be called "gv").

The following graphs are available:
              cfg        Control Flow Graph (CFG)
              dtree      Dominator Tree
              code       CFG showing code
              ssa        CFG showing code after SSA translation
              optcode    CFG showing code after IR optimizations

    Some graphs will only be available if certain optimizations are turned on.

--ncompile
    Instruct the runtime on the number of times that the method specified by --compile (or all the methods if --compileall is used) to be compiled. This is used for testing the code generator performance.

-v , --verbose
    Increases the verbosity level, each time it is listed, increases the verbosity level to include more information.

-V , --version
    Prints JIT version information.

ENVIRONMENT VARIABLES

GC_DONT_GC
    Turns off the garbage collection in Mono. This should be only used for debugging purposes

MONO_PATH
    Provides a search path to the runtime where to look for library files. Directories are separated by the platform path separator (colons on unix). Example: /home/username/lib:/usr/local/mono/lib

MONO_DISABLE_SHM
    If this variable is set, it disables the Windows I/O Emulation layer, and handles (files, events, mutexes, pipes) will not be shared across processes. This option is only available on Unix.

MONO_CFG_DIR
    If set, this variable overrides the default system configuration directory ($PREFIX/etc). It's used to locate machine.config file.

MONO_CONFIG
    If set, this variable overrides the default runtime configuration file ($PREFIX/etc/mono/config). The --config command line options overrides the environment variable.

FILES
On Unix assemblies are loaded from the installation lib directory. If you set `prefix' to /usr, the assemblies will be located in /usr/lib. On Windows, the assemblies are loaded from the directory where mono and mint live.

/etc/mono/config, ~/.mono/config

Mono runtime configuration file. See the mono-config(5) manual page for more information.

MAILING LISTS
Visit http://mail.ximian.com/mailman/mono-list for details.

WEB SITE
Visit: http://www.go-mono.com for details

SEE ALSO
mcs(1),mint(1),monodis(1),mono-config(5)