[System.Data] MS implementation does NOT expect CRLF in the output on *nix.
[mono.git] / man / mono.1
index df4e1bafe073e569bf5b013c67b9708681c94feb..07f7192b75d92f72a8ebaa6a23ee63af3dca2536 100644 (file)
@@ -3,10 +3,11 @@
 .\" Copyright 2003 Ximian, Inc. 
 .\" Copyright 2004-2011 Novell, Inc. 
 .\" Copyright 2011-2012 Xamarin Inc
+.\" Copyright 2013 7digital Media Ltd.
 .\" Author:
 .\"   Miguel de Icaza (miguel@gnu.org)
 .\"
-.TH Mono "Mono 2.11"
+.TH Mono "Mono 3.0"
 .SH NAME
 mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
 .SH SYNOPSIS
@@ -118,6 +119,7 @@ If specified, forces the generated AOT files to be bound to the
 runtime version of the compiling Mono.   This will prevent the AOT
 files from being consumed by a different Mono runtime.
 .I full
+.Sp
 This is currently an experimental feature as it is not complete.
 This instructs Mono to precompile code that has historically not been
 precompiled with AOT.   
@@ -144,6 +146,12 @@ Defaults to 128.
 .I nodebug
 Instructs the AOT compiler to not output any debugging information.
 .TP
+.I dwarfdebug
+Instructs the AOT compiler to emit DWARF debugging information. When
+used together with the nodebug option, only DWARF debugging
+information is emitted, but not the information that can be used at
+runtime.
+.TP
 .I nrgctx-trampolines=[number]
 When compiling in full aot mode, the generic sharing trampolines must be precreated
 in the AOT image.  You can add additional method trampolines with this argument.
@@ -214,7 +222,7 @@ example, --tool=prefix=arm-linux-gnueabi- will make the AOT compiler run
 .I write-symbols
 Instructs the AOT compiler to emit debug symbol information.
 .PP
-For more information about AOT, see: http://www.mono-project.com/AOT
+For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
 .RE
 .TP
 \fB--attach=[options]\fR
@@ -258,6 +266,12 @@ instructs the Mono runtime to start debugging in server mode, where Mono
 actively waits for the debugger front end to connect to the Mono process.  
 Mono will print out to stdout the IP address and port where it is listening.
 .TP
+.I setpgid=[y/n]
+If set to yes, Mono will call \fBsetpgid(0, 0)\fB on startup, if that function
+is available on the system. This is useful for ensuring that signals delivered
+to a process that is executing the debuggee are not propagated to the debuggee,
+e.g. when Ctrl-C sends \fBSIGINT\fB to the \fBsdb\fB tool.
+.TP
 .I suspend=[y/n]
 Defaults to yes, with the default option Mono will suspend the vm on startup 
 until it connects successfully to a debugger front end.  If you set it to 'n', in 
@@ -304,7 +318,7 @@ If the Mono runtime has been compiled with LLVM support (not available
 in all configurations), Mono will use the LLVM optimization and code
 generation engine to JIT or AOT compile.     
 .Sp
-For more information, consult: http://www.mono-project.com/Mono_LLVM
+For more information, consult: http://www.mono-project.com/docs/advanced/mono-llvm/
 .TP
 \fB--nollvm\fR
 When using a Mono that has been compiled with LLVM support, it forces
@@ -387,7 +401,7 @@ e.g. execution of Code Access Security (CAS) or non-CAS demands.
 .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
+security system than CAS, see http://www.mono-project.com/docs/web/moonlight/
 for more details and links to the descriptions of this new system. 
 .TP
 .I validil
@@ -411,7 +425,7 @@ the global assembly cache is always trusted.
 .TP
 \fB--server\fR
 Configures the virtual machine to be better suited for server
-operations (currently, a no-op).
+operations (currently, allows a heavier threadpool initialization).
 .TP
 \fB--verify-all\fR 
 Verifies mscorlib and assemblies in the global
@@ -564,7 +578,8 @@ itself, and not typically of interest to runtime users or developers.
 \fB--break method\fR
 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.
+breakpoint on the application's main method.  You can use it also with
+generics, for example "System.Collections.Generic.Queue`1:Peek"
 .TP
 \fB--breakonex\fR
 Inserts a breakpoint on exceptions.  This allows you to debug your
@@ -722,7 +737,7 @@ shared library `mono-profiler-custom.so'.  This profiler module must
 be on your dynamic linker library path.
 .PP 
 A list of other third party profilers is available from Mono's web
-site (www.mono-project.com/Performance_Tips)
+site (www.mono-project.com/docs/advanced/performance-tips/)
 .PP
 Custom profiles are written as shared libraries.  The shared library
 must be called `mono-profiler-NAME.so' where `NAME' is the name of
@@ -839,6 +854,27 @@ The following is a common use to track down problems with P/Invoke:
 
 .fi
 .PP
+.SH DEBUGGING WITH LLDB
+If you are using LLDB, you can use the 
+.B mono.py
+script to print some internal data structures with it.   To use this,
+add this to your 
+.B  $HOME/.lldbinit
+file:
+.nf
+command script import $PREFIX/lib/mono/lldb/mono.py
+.fi
+.PP
+Where $PREFIX is the prefix value that you used when you configured
+Mono (typically /usr).
+.PP
+Once this is done, then you can inspect some Mono Runtime data structures,
+for example:
+.nf
+(lldb) p method
+
+(MonoMethod *) $0 = 0x05026ac0 [mscorlib]System.OutOfMemoryException:.ctor()
+.fi
 .SH SERIALIZATION
 Mono's XML serialization engine by default will use a reflection-based
 approach to serialize which might be slow for continuous processing
@@ -891,6 +927,18 @@ 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.
 .TP
+\fBMONO_ASPNET_WEBCONFIG_CACHESIZE\fR
+Mono has a cache of ConfigSection objects for speeding up WebConfigurationManager
+queries. Its default size is 100 items, and when more items are needed, cache
+evictions start happening. If evictions are too frequent this could impose
+unnecessary overhead, which could be avoided by using this environment variable
+to set up a higher cache size (or to lower memory requirements by decreasing it).
+.TP
+\fBMONO_CAIRO_DEBUG_DISPOSE\fR
+If set, causes Mono.Cairo to collect stack traces when objects are allocated,
+so that the finalization/Dispose warnings include information about the
+instance's origin.
+.TP
 \fBMONO_CFG_DIR\fR
 If set, this variable overrides the default system configuration directory
 ($PREFIX/etc). It's used to locate machine.config file.
@@ -911,17 +959,21 @@ Override the automatic cpu detection mechanism. Currently used only on arm.
 The format of the value is as follows:
 .nf
 
-       "armvV [thumb]"
+       "armvV [thumb[2]]"
 
 .fi
 where V is the architecture number 4, 5, 6, 7 and the options can be currently be
-"thunb". Example:
+"thumb" or "thumb2". Example:
 .nf
 
        MONO_CPU_ARCH="armv4 thumb" mono ...
 
 .fi
 .TP
+\fBMONO_ARM_FORCE_SOFT_FLOAT\fR
+When Mono is built with a soft float fallback on ARM and this variable is set to
+"1", Mono will always emit soft float code, even if a VFP unit is detected.
+.TP
 \fBMONO_DISABLE_AIO\fR
 If set, tells mono NOT to attempt using native asynchronous I/O services. In
 that case, a default select/poll implementation is used. Currently only epoll()
@@ -946,6 +998,12 @@ This is can also be enabled by default by passing the
 .Sp
 This is the default from mono 2.8 onwards.
 .TP
+\fBMONO_DISABLE_SHARED_AREA\fR
+Unix only: If set, disable usage of shared memory for exposing
+performance counters. This means it will not be possible to both
+externally read performance counters from this processes or read
+those of external processes.
+.TP
 \fBMONO_DNS\fR
 When set, enables the use of a fully managed DNS resolver instead of the
 regular libc functions. This resolver performs much better when multiple
@@ -1043,34 +1101,16 @@ first generation (of two).  A larger nursery will usually speed up the
 program but will obviously use more memory.  The default nursery size
 4 MB.
 .TP
-\fBmajor=\fIcollector\fR
-Specifies which major collector to use.  Options are `marksweep' for
-the Mark&Sweep collector, `marksweep-conc' for concurrent Mark&Sweep,
-`marksweep-par' for parallel Mark&Sweep, `marksweep-fixed' for
-Mark&Sweep with a fixed heap, and `marksweep-fixed-par' for parallel
-Mark&Sweep with a fixed heap. The Mark&Sweep collector is the default.
-.TP
-\fBmajor-heap-size=\fIsize\fR
-Sets the size of the major heap (not including the large object space)
-for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
-`marksweep-fixed-par').  The size is in bytes, with optional suffixes
-`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
-The default is 512 megabytes.
+\fBmajor=\fIcollector\fR Specifies which major collector to use.
+Options are `marksweep' for the Mark&Sweep collector, and
+`marksweep-conc' for concurrent Mark&Sweep.  The non-concurrent
+Mark&Sweep collector is the default.
 .TP
 \fBsoft-heap-limit=\fIsize\fR
 Once the heap size gets larger than this size, ignore what the default
 major collection trigger metric says and only allow four nursery size's
 of major heap growth between major collections.
 .TP
-\fBwbarrier=\fIwbarrier\fR
-Specifies which write barrier to use.  Options are `cardtable' and
-`remset'.  The card table barrier is faster but less precise, and only
-supported for the Mark&Sweep major collector on 32 bit platforms.  The
-default is `cardtable' if it is supported, otherwise `remset'. The cardtable
-write barrier is faster and has a more stable and usually smaller
-memory footprint. If the program causes too much pinning during
-thread scan, it might be faster to enable remset.
-.TP
 \fBevacuation-threshold=\fIthreshold\fR
 Sets the evacuation threshold in percent.  This option is only available
 on the Mark&Sweep major collectors.  The value must be an
@@ -1173,6 +1213,11 @@ are allocated (clear-at-gc).   The consistency check ensures that
 there are no major to minor references that are not on the remembered
 sets. 
 .TP
+\fBmod-union-consistency-check\fR
+Checks that the mod-union cardtable is consistent before each
+finishing major collection pause.  This check is only applicable to
+concurrent major collectors.
+.TP
 \fBcheck-mark-bits\fR
 Checks that mark bits in the major heap are consistent at the end of
 each major collection.  Consistent mark bits mean that if an object is
@@ -1188,6 +1233,17 @@ is used.
 Performs a check to make sure that no references are left to an
 unloaded AppDomain.
 .TP
+\fBclear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created.  The default setting clears the whole
+nursery at GC time.
+.TP
+\fBdebug-clear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created, but at GC time fills it with the byte
+`0xff`, which should result in a crash more quickly if
+`clear-at-tlab-creation` doesn't work properly.
+.TP
 \fBclear-at-gc\fR
 This clears the nursery at GC time instead of doing it when the thread
 local allocation buffer (TLAB) is created.  The default is to clear
@@ -1227,6 +1283,21 @@ work, Mono needs to be compiled with the BINARY_PROTOCOL define on
 sgen-gc.c.   You can then use this command to explore the output
 .nf
                 sgen-grep-binprot 0x1234 0x5678 < file
+.TP
+\fBnursery-canaries\fR
+If set, objects allocated in the nursery are suffixed with a canary (guard)
+word, which is checked on each minor collection. Can be used to detect/debug
+heap corruption issues.
+.fi
+.ne
+.RE
+.TP
+\fBdo-not-finalize\fR
+If enabled, finalizers will not be run.  Everything else will be
+unaffected: finalizable objects will still be put into the
+finalization queue where they survive until they're scheduled to
+finalize.  Once they're not in the queue anymore they will be
+collected regularly.
 .fi
 .ne
 .RE
@@ -1328,13 +1399,15 @@ loader in subtle ways.
 Directories are separated by the platform path separator (colons on unix). Example:
 .B /home/username/lib:/usr/local/mono/lib
 .Sp
+Relative paths are resolved based on the launch-time current directory.
+.Sp
 Alternative solutions to MONO_PATH include: installing libraries into
 the Global Assembly Cache (see gacutil(1)) or having the dependent
 libraries side-by-side with the main executable.
 .Sp
 For a complete description of recommended practices for application
 deployment, see
-http://www.mono-project.com/Guidelines:Application_Deployment
+http://www.mono-project.com/docs/getting-started/application-deployment/
 .TP
 \fBMONO_RTC\fR
 Experimental RTC support in the statistical profiler: if the user has
@@ -1389,9 +1462,9 @@ small embedded systems.
 The default is 180 seconds.
 .TP
 \fBMONO_THREADS_PER_CPU\fR
-The maximum number of threads in the general threadpool will be
-20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
-variable is 10.
+The minimum number of threads in the general threadpool will be 
+MONO_THREADS_PER_CPU * number of CPUs. The default value for this
+variable is 1.
 .TP
 \fBMONO_XMLSERIALIZER_THS\fR
 Controls the threshold for the XmlSerializer to produce a custom
@@ -1506,6 +1579,12 @@ after a SIGSEGV or SIGABRT in unmanaged code.
 This option will suspend the program when a native SIGSEGV is received.
 This is useful for debugging crashes which do not happen under gdb,
 since a live process contains more information than a core file.
+.TP
+\fBcheck-pinvoke-callconv\fR
+This option causes the runtime to check for calling convention
+mismatches when using pinvoke, i.e. mixing cdecl/stdcall. It only
+works on windows. If a mismatch is detected, an
+ExecutionEngineException is thrown.
 .ne
 .RE
 .TP
@@ -1606,6 +1685,16 @@ for example, to see managed frame names on gdb backtraces.
 Enables the maximum JIT verbosity for the specified method. This is
 very helpfull to diagnose a miscompilation problems of a specific
 method.
+.TP
+\fBMONO_VERBOSE_HWCAP\fR
+If set, makes the JIT output information about detected CPU features
+(such as SSE, CMOV, FCMOV, etc) to stdout.
+.TP
+\fBMONO_CONSERVATIVE_HWCAP\fR
+If set, the JIT will not perform any hardware capability detection. This
+may be useful to pinpoint the cause of JIT issues. This is the default
+when Mono is built as an AOT cross compiler, so that the generated code
+will run on most hardware.
 .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
@@ -1702,7 +1791,7 @@ on this subject see the http://www.mono-project.com/Config_system.web
 page. 
 .SH MAILING LISTS
 Mailing lists are listed at the
-http://www.mono-project.com/Mailing_Lists
+http://www.mono-project.com/community/help/mailing-lists/
 .SH WEB SITE
 http://www.mono-project.com
 .SH SEE ALSO
@@ -1711,6 +1800,6 @@ certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1),
 mono-config(5), mozroots(1), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
 .PP
 For more information on AOT:
-http://www.mono-project.com/AOT
+http://www.mono-project.com/docs/advanced/aot/
 .PP
 For ASP.NET-related documentation, see the xsp(1) manual page