For some strange reason Console.Write(Line) allows null params formatter arguments
[mono.git] / man / mono.1
index 99af1b87e795d725af4c2305f1ab840a49639892..78315dc74afd5b03601cb266e2a80a5d6654aaac 100644 (file)
@@ -11,6 +11,8 @@ mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
 .SH SYNOPSIS
 .PP
 .B mono [options] file [arguments...]
+.PP
+.B mono-sgen [options] file [arguments...]
 .SH DESCRIPTION
 \fImono\fP is a runtime implementation of the ECMA Common Language
 Infrastructure.  This can be used to run ECMA and .NET applications.
@@ -35,6 +37,10 @@ is an ECMA assembly.  They typically have a .exe or .dll extension.
 The runtime provides a number of configuration options for running
 applications, for developing and debugging, and for testing and
 debugging the runtime itself.
+.PP
+The \fImono\fP command uses the Boehm conservative garbage collector
+while the \fImono-sgen\fP command uses a moving and generational
+garbage collector.
 .SH PORTABILITY
 On Unix-based systems, Mono provides a mechanism to emulate the 
 Windows-style file access, this includes providing a case insensitive
@@ -178,17 +184,6 @@ For more information about AOT, see: http://www.mono-project.com/AOT
 Currently the only option supported by this command line argument is
 \fBdisable\fR which disables the attach functionality.
 .TP
-\fB--full-aot\fR
-This is an experimental flag that instructs the Mono runtime to not
-generate any code at runtime and depend exclusively on the code
-generated from using mono --aot=full previously.   This is useful for
-platforms that do not permit dynamic code generation.
-.Sp
-Notice that this feature will abort execution at runtime if a codepath
-in your program, or Mono's class libraries attempts to generate code
-dynamically.  You should test your software upfront and make sure that
-you do not use any dynamic features.
-.TP
 \fB--config filename\fR
 Load the specified configuration file instead of the default one(s).
 The default files are /etc/mono/config and ~/.mono/config or the file
@@ -225,6 +220,13 @@ Specifies the diagnostics log level for
 .Sp
 Used to specify the file where the log will be stored, it defaults to
 standard output.
+.TP
+.I server=[y/n]
+Defaults to no, with the default option Mono will actively connect to the
+host/port configured with the \fBaddress\fR option.  If you set it to 'y', it 
+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.
 .ne
 .RE
 .TP
@@ -234,6 +236,24 @@ applications.  Currently this sets the GC system to avoid expanding
 the heap as much as possible at the expense of slowing down garbage
 collection a bit.
 .TP
+\fB--full-aot\fR
+This is an experimental flag that instructs the Mono runtime to not
+generate any code at runtime and depend exclusively on the code
+generated from using mono --aot=full previously.   This is useful for
+platforms that do not permit dynamic code generation.
+.Sp
+Notice that this feature will abort execution at runtime if a codepath
+in your program, or Mono's class libraries attempts to generate code
+dynamically.  You should test your software upfront and make sure that
+you do not use any dynamic features.
+.TP
+\fB--gc=boehm\fR, \fB--gc=sgen\fR
+Selects the Garbage Collector engine for Mono to use, Boehm or SGen.
+Currently this merely ensures that you are running either the
+\fImono\fR or \fImono-sgen\fR commands.    This flag can be set in the
+\fBMONO_ENV_OPTIONS\fR environment variable to force all of your child
+processes to use one particular kind of GC with the Mono runtime.
+.TP
 \fB--help\fR, \fB-h\fR
 Displays usage instructions.
 .TP
@@ -402,6 +422,10 @@ Turns on profiling.  For more information about profiling applications
 and code coverage see the sections "PROFILING" and "CODE COVERAGE"
 below. 
 .TP
+This option can be used multiple times, each time will load an
+additional profiler.   This allows developers to use modules that
+extend the JIT through the Mono profiling interface.
+.TP
 \fB--trace[=expression]\fR
 Shows method names as they are invoked.  By default all methods are
 traced. 
@@ -1273,6 +1297,12 @@ Unix only: Enable support for cross-process handles.  Cross-process
 handles are used to expose process handles, thread handles, named
 mutexes, named events and named semaphores across Unix processes.
 .TP
+\fBMONO_ENV_OPTIONS\fR
+This environment variable allows you to pass command line arguments to
+a Mono process through the environment.   This is useful for example
+to force all of your Mono processes to use LLVM or SGEN without having
+to modify any launch scripts.
+.TP
 \fBMONO_EVENTLOG_TYPE\fR
 Sets the type of event log provider to use (for System.Diagnostics.EventLog).
 .Sp
@@ -1328,6 +1358,97 @@ the right file name it is not necessarily possible to open the file.
 In general if you have problems with encodings in your filenames you
 should use the "convmv" program.
 .TP
+\fBMONO_GC_PARAMS\fR
+When using Mono with the SGen garbage collector this variable controls
+several parameters of the collector.  The variable's value is a comma
+separated list of words.
+.RS
+.ne 8
+.TP
+\fBnursery-size=\fIsize\fR
+Sets the size of the nursery.  The size is specified in bytes and must
+be a power of two.  The suffixes `k', `m' and `g' can be used to
+specify kilo-, mega- and gigabytes, respectively.  The nursery is the
+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-par' for parallel Mark&Sweep,
+`marksweep-fixed' for Mark&Sweep with a fixed heap,
+`marksweep-fixed-par' for parallel Mark&Sweep with a fixed heap and
+`copying' for the copying collector. 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.
+.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.
+.ne
+.RE
+.TP
+\fBMONO_GC_DEBUG\fR
+When using Mono with the SGen garbage collector this environment
+variable can be used to turn on various debugging features of the
+collector.  The value of this variable is a comma separated list of
+words.
+.RS
+.ne 8
+.TP
+\fInumber\fR
+Sets the debug level to the specified number.
+.TP
+\fBcollect-before-allocs\fR
+.TP
+\fBcheck-at-minor-collections\fR
+This performs a consistency check on minor collections and also clears
+the nursery at collection time, instead of the default, when buffers
+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
+\fBxdomain-checks\fR
+Performs a check to make sure that no references are left to an
+unloaded AppDomain.
+.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
+the nursery at TLAB creation time.
+.TP
+\fBconservative-stack-mark\fR
+Forces the GC to scan the stack conservatively, even if precise
+scanning is available.
+.TP
+\fBcheck-scan-starts\fR
+If set, does a plausibility check on the scan_starts before and after each collection
+.TP
+\fBheap-dump=\fIfile\fR
+Dumps the heap contents to the specified file.   To visualize the
+information, use the mono-heapviz tool.
+.TP
+\fBbinary-protocol=\fIfile\fR
+Outputs the debugging output to the specified file.   For this to
+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
+.fi
+.ne
+.RE
+.TP
 \fBMONO_GAC_PREFIX\fR
 Provides a prefix the runtime uses to look for Global Assembly Caches.
 Directories are separated by the platform path separator (colons on
@@ -1382,7 +1503,13 @@ in the following way:
        mono --profile=iomap yourapplication.exe
 
 .fi
-Note, however, that Mono currently supports only one profiler module at a time.
+Note, however, that Mono currently supports only one profiler module
+at a time.
+.TP
+\fBMONO_LLVM\fR
+When Mono is using the LLVM code generation backend you can use this
+environment variable to pass code generation options to the LLVM
+compiler.   
 .TP
 \fBMONO_MANAGED_WATCHER\fR
 If set to "disabled", System.IO.FileSystemWatcher will use a file watcher 
@@ -1491,6 +1618,13 @@ interpreter.  The possible values are `no' to disable the use of a
 custom serializer or a number to indicate when the XmlSerializer
 should start serializing.   The default value is 50, which means that
 the a custom serializer will be produced on the 50th use.
+.TP
+\fBMONO_X509_REVOCATION_MODE\fR
+Sets the revocation mode used when validating a X509 certificate chain (https,
+ftps, smtps...).  The default is 'nocheck', which performs no revocation check
+at all. The other possible values are 'offline', which performs CRL check (not
+implemented yet) and 'online' which uses OCSP and CRL to verify the revocation
+status (not implemented yet).
 .SH ENVIRONMENT VARIABLES FOR DEBUGGING
 .TP
 \fBMONO_ASPNET_NODELETE\fR
@@ -1510,6 +1644,11 @@ If this variable is set, when the Mono VM runs into a verification
 problem, instead of throwing an exception it will break into the
 debugger.  This is useful when debugging verifier problems
 .TP
+\fBcasts\fR
+This option can be used to get more detailed information from
+InvalidCast exceptions, it will provide information about the types
+involved.     
+.TP
 \fBcollect-pagefault-stats\fR
 Collects information about pagefaults.   This is used internally to
 track the number of page faults produced to load metadata.  To display
@@ -1542,6 +1681,16 @@ 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. 
 .TP
+\fBreverse-pinvoke-exceptions
+This option will cause mono to abort with a descriptive message when
+during stack unwinding after an exception it reaches a native stack
+frame. This happens when a managed delegate is passed to native code,
+and the managed delegate throws an exception. Mono will normally try
+to unwind the stack to the first (managed) exception handler, and it
+will skip any native stack frames in the process. This leads to 
+undefined behaviour (since mono doesn't know how to process native
+frames), leaks, and possibly crashes too.
+.TP
 \fBno-gdb-backtrace\fR
 This option will disable the GDB backtrace emitted by the runtime
 after a SIGSEGV or SIGABRT in unmanaged code.