wiki:Commentary/Rts/Config

Version 3 (modified by tim, 7 years ago) (diff)

ticky should not be bitrotted anymore!

RTS Configurations

The RTS can be built in several different ways, corresponding to global CPP defines. The flavour of the RTS is chosen by GHC when compiling a Haskell program, in response to certain command-line options: -prof, -threaded, etc.

The CPP symbols and their corresponding command-line flags are:

PROFILING
Enables profiling.
GHC option: -prof
RTS suffix: p
THREADED_RTS
Enables multithreading in the RTS, bound threads, and SMP execution.
GHC option: -threaded
RTS suffix: thr
DEBUG
Enables extra debugging code, assertions, traces, and the +RTS -D options.
GHC option: -debug
RTS suffix: debug
NO_REGS, USE_MINIINTERPRETER
Enables "unregisterised" compilation, i.e. via C with no mangler.
GHC option: -unreg
RTS suffix: u
TICKY
Ticky-ticky profiling
GHC option: -ticky
RTS suffix: t

So for example, libHSRts_thr_debug.a is the version of the runtime compiled with THREADED_RTS and DEBUG, and will be linked in if you use the -threaded and -debug options to GHC.

The ways that the RTS is built in are controlled by the GhcRTSWays Makefile variable.

Combinations

The following combinations are allowed:

  • DEBUG with anything
  • PROFILING only with NO_REGS, USE_MINIINTERPRETER

OLD ways

The following ways are bitrotted and currently don't work (GHC 6.6):

PAR, GRANSIM
Parallel Haskell
GHC option: -par
RTS suffix: mp, mg