dynamically loaded, the runtime environment and the JIT are always
present, even if code is compiled ahead of time.
.PP
-The runtime loads ths specified
+The runtime loads the specified
.I file
and optionally passes
the
is an ECMA assembly. They typically have a .exe or .dll extension.
.PP
The runtime provides a number of configuration options for running
-applications, for developping and debugging, and for testing and
+applications, for developing and debugging, and for testing and
debugging the runtime itself.
.SH PORTABILITY
On Unix-based systems, Mono provides a mechanism to emulate the
Windows-style file access, this includes providing a case insensitive
-view of the file system, directory separator mapping (from \ to /) and
+view of the file system, directory separator mapping (from \\ to /) and
stripping the drive letters.
.PP
This functionality is enabled by setting the
.Sp
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
+information which is not available on the generated file. When
precompiling code, you might want to compile with all optimizations
(-O=all). Pre-compiled code is position independent code.
.Sp
compilation program startup costs. The original assembly must still
be present, as the metadata is contained there.
.Sp
+AOT code typically can not be moved from one computer to another
+(CPU-specific optimizations that are detected at runtime) so you
+should not try to move the pre-generated assemblies or package the
+pre-generated assemblies for deployment.
+.Sp
For more information about AOT, see: http://www.mono-project.com/AOT
.TP
.I "--config filename"
optimizations to be turned off by prefixing the optimization name with
a minus sign.
.Sp
+In general, Mono has been tuned to use the default set of flags,
+before using these flags for a deployment setting, you might want to
+actually measure the benefits of using them.
+.Sp
The following optimizations are implemented:
.nf
all Turn on all optimizations
copyprop Copy propagation
deadce Dead code elimination
linears Linear scan global reg allocation
- cmov Conditional moves
+ cmov Conditional moves [arch-dependency]
shared Emit per-domain code
sched Instruction scheduling
intrins Intrinsic method implementations
tailc Tail recursion and tail calls
loop Loop related optimizations
- fcmov Fast x86 FP compares
+ fcmov Fast x86 FP compares [arch-dependency]
leaf Leaf procedures optimizations
aot Usage of Ahead Of Time compiled code
precomp Precompile all methods before executing Main
abcrem Array bound checks removal
ssapre SSA based Partial Redundancy Elimination
+ sse2 SSE2 instructions on x86 [arch-dependency]
.fi
.Sp
For example, to enable all the optimization but dead code
.nf
-O=all,-deadce,-inline
.fi
+.Sp
+The flags that are flagged with [arch-dependency] indicate that the
+given option if used in combination with Ahead of Time compilation
+(--aot flag) would produce pre-compiled code that will depend on the
+current CPU and might not be safely moved to another computer.
.TP
.I "--runtime=VERSION"
Mono supports different runtime versions. The version used depends on the program
mono --runtime=v2.0.50727 program.exe
.fi
.TP
-.I "--security"
-Activate the security manager (experimental feature in 1.1). This allows
-mono to support declarative security attributes (e.g. execution of, CAS
-or non-CAS, security demands). The security manager is OFF by default
-(experimental).
+.I "--security", "--security=mode"
+Activate the security manager, a currently experimental feature in
+Mono and it is OFF by default.
+.RS
+.ne 8
+.PP
+Using security without parameters is equivalent as calling it with the
+"cas" parameter.
+.PP
+The following modes are supported:
+.TP
+.I cas
+This allows mono to support declarative security attributes,
+e.g. execution of Code Access Security (CAS) or non-CAS demands.
+.TP
+.I core-clr
+Enables the core-clr security system, typically used for
+Moonlight/Silverlight applications. It provides a much simpler
+security system than CAS, see http://www.mono-project.com/Moonlight
+for more details and links to the descriptions of this new system.
+.ne
+.RE
.TP
.I "--server"
Configures the virtual machine to be better suited for server
-operations.
+operations (currently, a no-op).
.TP
.I "-V", "--version"
-Prints JIT version information.
+Prints JIT version information (system configuration, release number
+and branch names if available).
.SH DEVELOPMENT OPTIONS
.fi
And individual methods are referenced with the M: prefix, and the
-standar method notation:
+standard method notation:
.nf
mono --trace=M:System.Console:WriteLine app.exe
Mono by sending the QUIT signal to Mono, you can do this from the
command line, like this:
.nf
+
kill -QUIT pid
+
.fi
Where pid is the Process ID of the Mono process you want to examine.
-The process will continue running afterwards.
+The process will continue running afterwards, but its state is not
+guaranteed.
+.PP
+.B Important:
+this is a last-resort mechanism for debugging applications and should
+not be used to monitor or probe a production application. The
+integrity of the runtime after sending this signal is not guaranteed
+and the application might crash or terminate at any given point
+afterwards.
.PP
You can use the MONO_LOG_LEVEL and MONO_LOG_MASK environment variables
to get verbose debugging output about the execution of your
.PP
.SH SERIALIZATION
Mono's XML serialization engine by default will use a reflection-based
-approach to serialize which might be slow for continous processing
+approach to serialize which might be slow for continuous processing
(web service applications). The serialization engine will determine
when a class must use a hand-tuned serializer based on a few
parameters and if needed it will produce a customized C# serializer
If set, this variable overrides the default system configuration directory
($PREFIX/etc). It's used to locate machine.config file.
.TP
+.I "MONO_COM"
+Sets the style of COM interop. If the value of this variable is "MS"
+Mono will use string marhsalling routines from the liboleaut32 for the
+BSTR type library, any other values will use the mono-builtin BSTR
+string marshalling.
+.TP
.I "MONO_CONFIG"
If set, this variable overrides the default runtime configuration file
($PREFIX/etc/mono/config). The --config command line options overrides the
.I "keep-delegates"
This option will leak delegate trampolines that are no longer
referenced as to present the user with more information about a
-delegate missuse. Basically a delegate instance might be created,
+delegate misuse. Basically a delegate instance might be created,
passed to unmanaged code, and no references kept in managed code,
which will garbage collect the code. With this option it is possible
to track down the source of the problems.
.Sp
Persists event logs and entries to the local file system.
.Sp
-The directory in which to persit the event logs, event sources and entries
+The directory in which to persist the event logs, event sources and entries
can be specified as part of the value.
.Sp
If the path is not explicitly set, it defaults to "/var/lib/mono/eventlog"
Unix systems and native API calls on Windows, falling back to the
managed implementation on error.
.TP
+.I "MONO_NO_SMP"
+If set causes the mono process to be bound to a single processor. This may be
+useful when debugging or working around race conditions.
+.TP
.I "MONO_PATH"
Provides a search path to the runtime where to look for library
files. This is a tool convenient for debugging applications, but
.I "MONO_RTC"
Experimental RTC support in the statistical profiler: if the user has
the permission, more accurate statistics are gathered. The MONO_RTC
-value must be restricted to what the linux rtc allows: power of two
+value must be restricted to what the Linux rtc allows: power of two
from 64 to 8192 Hz. To enable higher frequencies like 4096 Hz, run as root:
.nf
If set, extra checks are made during IO operations. Currently, this
includes only advisory locks around file writes.
.TP
+.I "MONO_DISABLE_SHM"
+If set, disables the shared memory files used for cross-process
+handles: process have only private handles. This means that process
+and thread handles are not available to other processes, and named
+mutexes, named events and named semaphores are not visible between
+processes.
+.Sp
+This is can also be enabled by default by passing the
+"--disable-shared-handles" option to configure.
+.TP
.I "MONO_THEME"
The name of the theme to be used by Windows.Forms. Available themes today
include "clearlooks", "nice" and "win32".
.Sp
The default is "win32".
.TP
+.I "MONO_TLS_SESSION_CACHE_TIMEOUT"
+The time, in seconds, that the SSL/TLS session cache will keep it's entry to
+avoid a new negotiation between the client and a server. Negotiation are very
+CPU intensive so an application-specific custom value may prove useful for
+small embedded systems.
+.Sp
+The default is 180 seconds.
+.TP
.I "MONO_THREADS_PER_CPU"
The maximum number of threads in the general threadpool will be
20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
Set this value to 1 to prevent the serializer from removing the
temporary files that are created for fast serialization; This might
be useful when debugging.
+.TP
+.I "MONO_ASPNET_INHIBIT_SETTINGSMAP"
+Mono contains a feature which allows modifying settings in the .config files shipped
+with Mono by using config section mappers. The mappers and the mapping rules are
+defined in the $prefix/etc/mono/2.0/settings.map file and, optionally, in the
+settings.map file found in the top-level directory of your ASP.NET application.
+Both files are read by System.Web on application startup, if they are found at the
+above locations. If you don't want the mapping to be performed you can set this
+variable in your environment before starting the application and no action will
+be taken.
.SH ENVIRONMENT VARIABLES FOR DEBUGGING
.TP
.I "MONO_ASPNET_NODELETE"
as it forces all of the commands send to X11 server to be done
synchronously. The default mode of operation is asynchronous which
makes it hard to isolate the root of certain problems.
+.TP
+.I "MONO_GENERIC_SHARING"
+This environment variable is completely unsupported, don't use it.
+This controls for which classes to enable generic code sharing in
+principle. Permissible values are "all", "corlib" and "none". The
+default is "corlib", meaning that sharing can only happen for corlib
+classes. Note that to enable generation of shared code the "gshared"
+compiler option has to be set as well.
.SH VALGRIND
If you want to use Valgrind, you will find the file `mono.supp'
useful, it contains the suppressions for the GC which trigger