Document +RTS --info, and make it a Read'able Haskell value
[ghc-hetmet.git] / docs / users_guide / runtime_control.xml
index 77c72be..776b65f 100644 (file)
          the <option>-C</option> or <option>-i</option> options.
          However, setting <option>-V</option> is required in order to
          increase the resolution of the time profiler.</para>
+
+         <para>Using a value of zero disables the RTS clock
+         completetly, and has the effect of disabling timers that
+         depend on it: the context switch timer and the heap profiling
+         timer.  Context switches will still happen, but
+         deterministically and at a rate much faster than normal.
+         Disabling the interval timer is useful for debugging, because
+         it eliminates a source of non-determinism at runtime.</para>
+       </listitem>
+     </varlistentry>
+
+     <varlistentry>
+       <term><option>--install-signal-handlers=<replaceable>yes|no</replaceable></option>
+       <indexterm><primary><option>--install-signal-handlers</option></primary><secondary>RTS
+       option</secondary></indexterm></term>
+       <listitem>
+         <para>If yes (the default), the RTS installs signal handlers to catch
+         things like ctrl-C. This option is primarily useful for when
+         you are using the Haskell code as a DLL, and want to set your
+         own signal handlers.</para>
        </listitem>
      </varlistentry>
     </variablelist>
@@ -641,6 +661,29 @@ char *ghc_rts_opts = "-H128m -K1m";
     <filename>ghc/compiler/parser/hschooks.c</filename> in a GHC
     source tree.</para>
   </sect2>
+
+  <sect2>
+    <title>Getting information about the RTS</title>
+
+    <indexterm><primary>RTS</primary></indexterm>
+
+    <para>It is possible to ask the RTS to give some information about
+    itself. To do this, use the <option>--info</option> flag, e.g.</para>
+<screen>
+$ ./a.out +RTS --info
+ [("GHC RTS", "Yes")
+ ,("GHC version", "6.7")
+ ,("RTS way", "rts_p")
+ ,("Host platform", "x86_64-unknown-linux")
+ ,("Build platform", "x86_64-unknown-linux")
+ ,("Target platform", "x86_64-unknown-linux")
+ ,("Compiler unregisterised", "NO")
+ ,("Tables next to code", "YES")
+ ]
+</screen>
+    <para>The information is formatted such that it can be read as a
+    of type <literal>[(String, String)]</literal>.</para>
+  </sect2>
 </sect1>
 
 <!-- Emacs stuff: