Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
949ce3bb
Commit
949ce3bb
authored
Jun 19, 2008
by
Simon Marlow
Browse files
Document the change to +RTS -S/-s/-t
parent
c0c81d09
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/users_guide/runtime_control.xml
View file @
949ce3bb
...
...
@@ -436,46 +436,35 @@
</varlistentry>
<varlistentry>
<term>
<option>
-t
</option><optional><replaceable>
file
</replaceable></optional>
<indexterm><primary><option>
-t
</option></primary><secondary>
RTS option
</secondary></indexterm>
</term>
<term>
<option>
-s
</option><replaceable>
file
</replaceable>
<option>
-s
</option><
optional><
replaceable>
file
</replaceable>
</optional>
<indexterm><primary><option>
-s
</option></primary><secondary>
RTS option
</secondary></indexterm>
</term>
<term>
<option>
-S
</option><replaceable>
file
</replaceable>
<option>
-S
</option><
optional><
replaceable>
file
</replaceable>
</optional>
<indexterm><primary><option>
-S
</option></primary><secondary>
RTS option
</secondary></indexterm>
</term>
<listitem>
<para>
Write modest (
<option>
-s
</option>
) or verbose
(
<option>
-S
</option>
) garbage-collector statistics into file
<replaceable>
file
</replaceable>
. The default
<replaceable>
file
</replaceable>
is
<filename><replaceable>
program
</replaceable>
.stat
</filename>
. The
<replaceable>
file
</replaceable>
<constant>
stderr
</constant>
is treated specially, with the output really being sent to
<constant>
stderr
</constant>
.
</para>
<para>
This option is useful for watching how the storage
manager adjusts the heap size based on the current amount of
live data.
</para>
</listitem>
</varlistentry>
<para>
These options produce runtime-system statistics, such
as the amount of time spent executing the program and in the
garbage collector, the amount of memory allocated, the
maximum size of the heap, and so on. The three
variants give different levels of detail:
<option>
-t
</option>
produces a single line of output in the
same format as GHC's
<option>
-Rghc-timing
</option>
option,
<option>
-s
</option>
produces a more detailed summary at the
end of the program, and
<option>
-S
</option>
additionally
produces information about each and every garbage
collection.
</para>
<varlistentry>
<term>
<option>
-t
<replaceable>
file
</replaceable></option>
<indexterm><primary><option>
-t
</option></primary><secondary>
RTS option
</secondary></indexterm>
</term>
<listitem>
<para>
Write a one-line GC stats summary after running the
program. This output is in the same format as that produced
by the
<option>
-Rghc-timing
</option>
option.
</para>
<para>
As with
<option>
-s
</option>
, the default
<replaceable>
file
</replaceable>
is
<filename><replaceable>
program
</replaceable>
.stat
</filename>
. The
<replaceable>
file
</replaceable>
<constant>
stderr
</constant>
is treated specially, with the output really being sent to
<constant>
stderr
</constant>
.
</para>
<para>
The output is placed in
<replaceable>
file
</replaceable>
. If
<replaceable>
file
</replaceable>
is omitted, then the output
is sent to
<constant>
stderr
</constant>
.
</para>
</listitem>
</varlistentry>
</variablelist>
...
...
docs/users_guide/sooner.xml
View file @
949ce3bb
...
...
@@ -32,7 +32,7 @@ should go here!</para>
garbage collection for GHC, which means less compilation
time. If you use the
<option>
-Rghc-timing
</option>
option,
you'll get a garbage-collector report. (Again, you can use
the cheap-and-nasty
<option>
+RTS -S
stderr
-RTS
</option>
the cheap-and-nasty
<option>
+RTS -S -RTS
</option>
option to send the GC stats straight to standard
error.)
</para>
...
...
@@ -511,13 +511,13 @@ Use <literal>strip</literal> on your executables.
<para>
“
I think I have a space leak
…”
Re-run your program
with
<option>
+RTS -S
stderr
</option>
, and remove all doubt! (You'll
with
<option>
+RTS -S
</option>
, and remove all doubt! (You'll
see the heap usage get bigger and bigger
…
)
[
Hmmm
…
this might be even easier with the
<option>
-G1
</option>
RTS option; so
…
<command>
./a.out +RTS
-S
stderr
-G1
</command>
...]
-S -G1
</command>
...]
<indexterm><primary>
-G RTS option
</primary></indexterm>
<indexterm><primary>
-S
stderr
RTS option
</primary></indexterm>
<indexterm><primary>
-S RTS option
</primary></indexterm>
</para>
<para>
...
...
docs/users_guide/using.xml
View file @
949ce3bb
...
...
@@ -1770,7 +1770,7 @@ f "2" = 2
<sect2>
<title>
Hints for using SMP parallelism
</title>
<para>
Add the
<literal>
-s
stderr
</literal>
RTS option when
<para>
Add the
<literal>
-s
</literal>
RTS option when
running the program to see timing stats, which will help to tell you
whether your program got faster by using more CPUs or not. If the user
time is greater than
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment