GHC.RTS.Flags

base-4.9.1.0: Basic libraries

Safe Haskell | None
Language | Haskell2010

GHC.RTS.Flags

Description

Accessors to GHC RTS flags. Descriptions of flags can be seen in GHC User's Guide, or by running RTS help message using `+RTS --help`.

Since: 4.8.0.0

Synopsis

- type RtsTime = Word64
- type RtsNat = Word32
- data RTSFlags = RTSFlags {
  - gcFlags :: GCFlags
  - concurrentFlags :: ConcFlags
  - miscFlags :: MiscFlags
  - debugFlags :: DebugFlags
  - costCentreFlags :: CCFlags
  - profilingFlags :: ProfFlags
  - traceFlags :: TraceFlags
  - tickyFlags :: TickyFlags
  }
- data GiveGCStats
  - = NoGCStats
  - | CollectGCStats
  - | OneLineGCStats
  - | SummaryGCStats
  - | VerboseGCStats
- data GCFlags = GCFlags {
  - statsFile :: Maybe FilePath
  - giveStats :: GiveGCStats
  - maxStkSize :: RtsNat
  - initialStkSize :: RtsNat
  - stkChunkSize :: RtsNat
  - stkChunkBufferSize :: RtsNat
  - maxHeapSize :: RtsNat
  - minAllocAreaSize :: RtsNat
  - minOldGenSize :: RtsNat
  - heapSizeSuggestion :: RtsNat
  - heapSizeSuggestionAuto :: Bool
  - oldGenFactor :: Double
  - pcFreeHeap :: Double
  - generations :: RtsNat
  - steps :: RtsNat
  - squeezeUpdFrames :: Bool
  - compact :: Bool
  - compactThreshold :: Double
  - sweep :: Bool
  - ringBell :: Bool
  - frontpanel :: Bool
  - idleGCDelayTime :: RtsTime
  - doIdleGC :: Bool
  - heapBase :: Word
  - allocLimitGrace :: Word
  }
- data ConcFlags = ConcFlags {
  - ctxtSwitchTime :: RtsTime
  - ctxtSwitchTicks :: Int
  }
- data MiscFlags = MiscFlags {
  - tickInterval :: RtsTime
  - installSignalHandlers :: Bool
  - machineReadable :: Bool
  - linkerMemBase :: Word
  }
- data DebugFlags = DebugFlags {
  - scheduler :: Bool
  - interpreter :: Bool
  - weak :: Bool
  - gccafs :: Bool
  - gc :: Bool
  - block_alloc :: Bool
  - sanity :: Bool
  - stable :: Bool
  - prof :: Bool
  - linker :: Bool
  - apply :: Bool
  - stm :: Bool
  - squeeze :: Bool
  - hpc :: Bool
  - sparks :: Bool
  }
- data DoCostCentres
  - = CostCentresNone
  - | CostCentresSummary
  - | CostCentresVerbose
  - | CostCentresAll
  - | CostCentresXML
- data CCFlags = CCFlags {
  - doCostCentres :: DoCostCentres
  - profilerTicks :: Int
  - msecsPerTick :: Int
  }
- data DoHeapProfile
  - = NoHeapProfiling
  - | HeapByCCS
  - | HeapByMod
  - | HeapByDescr
  - | HeapByType
  - | HeapByRetainer
  - | HeapByLDV
  - | HeapByClosureType
- data ProfFlags = ProfFlags {
  - doHeapProfile :: DoHeapProfile
  - heapProfileInterval :: RtsTime
  - heapProfileIntervalTicks :: Word
  - includeTSOs :: Bool
  - showCCSOnException :: Bool
  - maxRetainerSetSize :: Word
  - ccsLength :: Word
  - modSelector :: Maybe String
  - descrSelector :: Maybe String
  - typeSelector :: Maybe String
  - ccSelector :: Maybe String
  - ccsSelector :: Maybe String
  - retainerSelector :: Maybe String
  - bioSelector :: Maybe String
  }
- data DoTrace
  - = TraceNone
  - | TraceEventLog
  - | TraceStderr
- data TraceFlags = TraceFlags {
  - tracing :: DoTrace
  - timestamp :: Bool
  - traceScheduler :: Bool
  - traceGc :: Bool
  - sparksSampled :: Bool
  - sparksFull :: Bool
  - user :: Bool
  }
- data TickyFlags = TickyFlags {
  - showTickyStats :: Bool
  - tickyFile :: Maybe FilePath
  }
- getRTSFlags :: IO RTSFlags
- getGCFlags :: IO GCFlags
- getConcFlags :: IO ConcFlags
- getMiscFlags :: IO MiscFlags
- getDebugFlags :: IO DebugFlags
- getCCFlags :: IO CCFlags
- getProfFlags :: IO ProfFlags
- getTraceFlags :: IO TraceFlags
- getTickyFlags :: IO TickyFlags

# Documentation

type RtsTime = Word64 Source #

``Time`` is defined as a ``StgWord64`` in `stg/Types.h`

Since: 4.8.2.0

type RtsNat = Word32 Source #

``nat`` defined in `rts/Types.h`

Since: 4.8.2.0

data RTSFlags Source #

Parameters of the runtime system

Since: 4.8.0.0

Constructors

RTSFlags |
Fields gcFlags :: GCFlags concurrentFlags :: ConcFlags miscFlags :: MiscFlags debugFlags :: DebugFlags costCentreFlags :: CCFlags profilingFlags :: ProfFlags traceFlags :: TraceFlags tickyFlags :: TickyFlags

Instances

Show RTSFlags # |
Methods showsPrec :: Int -> RTSFlags -> ShowS Source # show :: RTSFlags -> String Source # showList :: [RTSFlags] -> ShowS Source #

data GiveGCStats Source #

Should we produce a summary of the garbage collector statistics after the program has exited?

Since: 4.8.2.0

Constructors

NoGCStats |
CollectGCStats |
OneLineGCStats |
SummaryGCStats |
VerboseGCStats |

Instances

Enum GiveGCStats # |
Methods succ :: GiveGCStats -> GiveGCStats Source # pred :: GiveGCStats -> GiveGCStats Source # toEnum :: Int -> GiveGCStats Source # fromEnum :: GiveGCStats -> Int Source # enumFrom :: GiveGCStats -> [GiveGCStats] Source # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] Source # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] Source #
Show GiveGCStats # |
Methods showsPrec :: Int -> GiveGCStats -> ShowS Source # show :: GiveGCStats -> String Source # showList :: [GiveGCStats] -> ShowS Source #

data GCFlags Source #

Parameters of the garbage collector.

Since: 4.8.0.0

Constructors

GCFlags |
Fields statsFile :: Maybe FilePath giveStats :: GiveGCStats maxStkSize :: RtsNat initialStkSize :: RtsNat stkChunkSize :: RtsNat stkChunkBufferSize :: RtsNat maxHeapSize :: RtsNat minAllocAreaSize :: RtsNat minOldGenSize :: RtsNat heapSizeSuggestion :: RtsNat heapSizeSuggestionAuto :: Bool oldGenFactor :: Double pcFreeHeap :: Double generations :: RtsNat steps :: RtsNat squeezeUpdFrames :: Bool compact :: Bool True = "compact all the time" compactThreshold :: Double sweep :: Bool use "mostly mark-sweep" instead of copying for the oldest generation ringBell :: Bool frontpanel :: Bool idleGCDelayTime :: RtsTime doIdleGC :: Bool heapBase :: Word address to ask the OS for memory allocLimitGrace :: Word

Instances

Show GCFlags # |
Methods showsPrec :: Int -> GCFlags -> ShowS Source # show :: GCFlags -> String Source # showList :: [GCFlags] -> ShowS Source #

data ConcFlags Source #

Parameters concerning context switching

Since: 4.8.0.0

Constructors

ConcFlags |
Fields ctxtSwitchTime :: RtsTime ctxtSwitchTicks :: Int

Instances

Show ConcFlags # |
Methods showsPrec :: Int -> ConcFlags -> ShowS Source # show :: ConcFlags -> String Source # showList :: [ConcFlags] -> ShowS Source #

data MiscFlags Source #

Miscellaneous parameters

Since: 4.8.0.0

Constructors

MiscFlags |
Fields tickInterval :: RtsTime installSignalHandlers :: Bool machineReadable :: Bool linkerMemBase :: Word address to ask the OS for memory for the linker, 0 ==> off

Instances

Show MiscFlags # |
Methods showsPrec :: Int -> MiscFlags -> ShowS Source # show :: MiscFlags -> String Source # showList :: [MiscFlags] -> ShowS Source #

data DebugFlags Source #

Flags to control debugging output & extra checking in various subsystems.

Since: 4.8.0.0

Constructors

DebugFlags |
Fields scheduler :: Bool `s` interpreter :: Bool `i` weak :: Bool `w` gccafs :: Bool `G` gc :: Bool `g` block_alloc :: Bool `b` sanity :: Bool `S` stable :: Bool `t` prof :: Bool `p` linker :: Bool `l` the object linker apply :: Bool `a` stm :: Bool `m` squeeze :: Bool `z` stack squeezing & lazy blackholing hpc :: Bool `c` coverage sparks :: Bool `r`

Instances

Show DebugFlags # |
Methods showsPrec :: Int -> DebugFlags -> ShowS Source # show :: DebugFlags -> String Source # showList :: [DebugFlags] -> ShowS Source #

data DoCostCentres Source #

Should the RTS produce a cost-center summary?

Since: 4.8.2.0

Constructors

CostCentresNone |
CostCentresSummary |
CostCentresVerbose |
CostCentresAll |
CostCentresXML |

Instances

Enum DoCostCentres # |
Methods succ :: DoCostCentres -> DoCostCentres Source # pred :: DoCostCentres -> DoCostCentres Source # toEnum :: Int -> DoCostCentres Source # fromEnum :: DoCostCentres -> Int Source # enumFrom :: DoCostCentres -> [DoCostCentres] Source # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] Source # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] Source #
Show DoCostCentres # |
Methods showsPrec :: Int -> DoCostCentres -> ShowS Source # show :: DoCostCentres -> String Source # showList :: [DoCostCentres] -> ShowS Source #

data CCFlags Source #

Parameters pertaining to the cost-center profiler.

Since: 4.8.0.0

Constructors

CCFlags |
Fields doCostCentres :: DoCostCentres profilerTicks :: Int msecsPerTick :: Int

Instances

Show CCFlags # |
Methods showsPrec :: Int -> CCFlags -> ShowS Source # show :: CCFlags -> String Source # showList :: [CCFlags] -> ShowS Source #

data DoHeapProfile Source #

What sort of heap profile are we collecting?

Since: 4.8.2.0

Constructors

NoHeapProfiling |
HeapByCCS |
HeapByMod |
HeapByDescr |
HeapByType |
HeapByRetainer |
HeapByLDV |
HeapByClosureType |

Instances

Enum DoHeapProfile # |
Methods succ :: DoHeapProfile -> DoHeapProfile Source # pred :: DoHeapProfile -> DoHeapProfile Source # toEnum :: Int -> DoHeapProfile Source # fromEnum :: DoHeapProfile -> Int Source # enumFrom :: DoHeapProfile -> [DoHeapProfile] Source # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] Source #
Show DoHeapProfile # |
Methods showsPrec :: Int -> DoHeapProfile -> ShowS Source # show :: DoHeapProfile -> String Source # showList :: [DoHeapProfile] -> ShowS Source #

data ProfFlags Source #

Parameters of the cost-center profiler

Since: 4.8.0.0

Constructors

ProfFlags |
Fields doHeapProfile :: DoHeapProfile heapProfileInterval :: RtsTime time between samples heapProfileIntervalTicks :: Word ticks between samples (derived) includeTSOs :: Bool showCCSOnException :: Bool maxRetainerSetSize :: Word ccsLength :: Word modSelector :: Maybe String descrSelector :: Maybe String typeSelector :: Maybe String ccSelector :: Maybe String ccsSelector :: Maybe String retainerSelector :: Maybe String bioSelector :: Maybe String

Instances

Show ProfFlags # |
Methods showsPrec :: Int -> ProfFlags -> ShowS Source # show :: ProfFlags -> String Source # showList :: [ProfFlags] -> ShowS Source #

data DoTrace Source #

Is event tracing enabled?

Since: 4.8.2.0

Constructors

TraceNone | no tracing
TraceEventLog | send tracing events to the event log
TraceStderr | send tracing events to `stderr`

Instances

Enum DoTrace # |
Methods succ :: DoTrace -> DoTrace Source # pred :: DoTrace -> DoTrace Source # toEnum :: Int -> DoTrace Source # fromEnum :: DoTrace -> Int Source # enumFrom :: DoTrace -> [DoTrace] Source # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] Source # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] Source #
Show DoTrace # |
Methods showsPrec :: Int -> DoTrace -> ShowS Source # show :: DoTrace -> String Source # showList :: [DoTrace] -> ShowS Source #

data TraceFlags Source #

Parameters pertaining to event tracing

Since: 4.8.0.0

Constructors

TraceFlags |
Fields tracing :: DoTrace timestamp :: Bool show timestamp in stderr output traceScheduler :: Bool trace scheduler events traceGc :: Bool trace GC events sparksSampled :: Bool trace spark events by a sampled method sparksFull :: Bool trace spark events 100% accurately user :: Bool trace user events (emitted from Haskell code)

Instances

Show TraceFlags # |
Methods showsPrec :: Int -> TraceFlags -> ShowS Source # show :: TraceFlags -> String Source # showList :: [TraceFlags] -> ShowS Source #

data TickyFlags Source #

Parameters pertaining to ticky-ticky profiler

Since: 4.8.0.0

Constructors

TickyFlags |
Fields showTickyStats :: Bool tickyFile :: Maybe FilePath

Instances

Show TickyFlags # |
Methods showsPrec :: Int -> TickyFlags -> ShowS Source # show :: TickyFlags -> String Source # showList :: [TickyFlags] -> ShowS Source #

getRTSFlags :: IO RTSFlags Source #

getGCFlags :: IO GCFlags Source #

getConcFlags :: IO ConcFlags Source #

getMiscFlags :: IO MiscFlags Source #

getDebugFlags :: IO DebugFlags Source #

getCCFlags :: IO CCFlags Source #

getProfFlags :: IO ProfFlags Source #

getTraceFlags :: IO TraceFlags Source #

getTickyFlags :: IO TickyFlags Source #