nhc98 runtime options
Programs compiled by nhc98 can be given runtime options independently of any command-line arguments that the program will interpret for itself. Options directed at the runtime system must be enclosed between +RTS and -RTS. Any command-line arguments not enclosed will be made available to the program as the return value of the System.getArgs library call.
Options for system resources.
Memory sizes can be given in bytes or words, and may use symbols
for Mega- and kilo-. Both upper and lower case are acceptable.
For example, 2mw (2 Megawords), 4KB (4 kilobytes). If no units are
specified, the default is bytes. A profiling interval may be given as
the number of heap allocations, or in Mega-, kilo-, or milli- seconds.
For example, 1Ms (1 Megasecond), 2ms (2 milliseconds), 1M (1 megabyte).
If no units are specified, the default is allocations.
Heap profiling options.
These options are only meaningful if the program has been compiled for heap profiling - otherwise they are ignored. The first occurrence of any of the options pcmrbl determines the primary form of the profile. Subsequent pcmrbl options introduce restrictions on the profile, for instance -p -c: asks for a producer profile restricted to producers of the `:' (list) construction. Restrictions are almost all orthogonal to each other, and you may have as many as you like. Except for biography and lifetime restrictions, the format is of a list of names, separated by commas. (In general, you may need to use quotes around the list to protect special characters from the shell.) The heap profile results are produced in a file named program.hp. Use the hp2graph tool to convert this to a Postscript or FrameMaker picture of the graph.
Time profiling options.
These options are only meaningful if the program has been compiled for time profiling - otherwise they are ignored. The various single-letter flags can be aggregated together, e.g. -tmt. You can give a list of module names separated by spaces using the shell quoting mechanism e.g. -t"+Prelude -Main +IO". The default is to show all functions written by the user separately, but only show the total for library modules (Prelude, IO, etc.).
The time profile results are produced in a file named program.tp.
The latest updates to these pages are available on the WWW from http://www.haskell.org/nhc98/
18th May 2001