Nhc13 runtime options


Programs compiled by nhc13 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.
-Hsize allocate a heap of specified size
-Vsize allocate a stack of specified size
-isize set the profiling interval to size

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. Profiling intervals may be given in Mega-, kilo-, or milli- seconds. For example, 1Ms (1 Megasecond), 2ms (2 milliseconds). If no units are specified, the default is seconds.

Miscellaneous options.
-sgarbage collect statics
-Bprint progress info at every garbage collection (repeating the flag increases amount of info)
-Iturn on instruction counts (Only if runtime system was compiled with -DINSCOUNT=1)
-Xturn on Xlib debugging
-tturn on time profiling (see below)
Heap profiling options.
-p build a producer heap profile
-c build a construction heap profile
-m build a module heap profile
-r[num] build a retainer heap profile, with a maximum retainer set size of num (default=1).
-b build a biographical heap profile
-l build a lifetime heap profile
-pnames restrict profile to named producers
-cnames restrict profile to named constructions
-mnames restrict profile to named modules
-rnames restrict profile to named retainers
-bname restrict profile to named biographical phase (lag, drag, void, or use)
-lnums restrict profile to numbered lifetimes (min-, -max, or min-max)
-@ count application nodes during profiling
-u print usage during profiling
-1 first run (for biography/lifetime)
-2 second run (for biography/lifetime)

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.

Tracer options.
-ds name suspect the module name (even if compiled as a trusted module)
-dt name trust the module name (even if compiled as a suspect module)
-dshowshow ???
-dnrdo not trace R ???
-dnsatfdo not trace SatF ???
-dnsatdo not trace Sat ???
-dqquit tracing when ???
-dpsprune Sats ???
-dksize prune traces at depth size
-D[num] turn on stack dumps to depth num (default=1)
-T[flags] turn on tracing flags where flags is any sequence of
rtrace returns
etrace evals
btrace instruction pointer
strace stack pointer
htrace heap pointer
adump address
idump indirections
tdump top
numtrace depth
If flags is missing, the default is bshait

Tracer options are only meaningful if the program has been compiled for tracing - otherwise they are ignored.

Time profiling options.
-tturn on time profiling
-tt order results by time consumed per function
-te order results by number of entries per function
-tp calculate percentages for entries as well as for time consumed
-ts count sub-function entries separately
-tf count sub-function entries separately
-t-Module show only the total for all functions in named module
-t+Module show all functions separately in named module
-t+all show all functions separately in all modules
-t-all show only total-per-module for all modules

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. -ttps. You can give a list of module names separated by spaces using the shell quoting mechanism e.g. -t"+Prelude -Main +IO". 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.cs.york.ac.uk/fp/nhc13/

1998.06.26
York Functional Programming Group
Malcolm.Wallace@cs.york.ac.uk