GHC.RTS.Flags

base-4.11.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: base-4.8.0.0

Synopsis

- type RtsTime = Word64
- data RTSFlags = RTSFlags {
  - gcFlags :: GCFlags
  - concurrentFlags :: ConcFlags
  - miscFlags :: MiscFlags
  - debugFlags :: DebugFlags
  - costCentreFlags :: CCFlags
  - profilingFlags :: ProfFlags
  - traceFlags :: TraceFlags
  - tickyFlags :: TickyFlags
  - parFlags :: ParFlags
  }
- data GiveGCStats
  - = NoGCStats
  - | CollectGCStats
  - | OneLineGCStats
  - | SummaryGCStats
  - | VerboseGCStats
- data GCFlags = GCFlags {
  - statsFile :: Maybe FilePath
  - giveStats :: GiveGCStats
  - maxStkSize :: Word32
  - initialStkSize :: Word32
  - stkChunkSize :: Word32
  - stkChunkBufferSize :: Word32
  - maxHeapSize :: Word32
  - minAllocAreaSize :: Word32
  - largeAllocLim :: Word32
  - nurseryChunkSize :: Word32
  - minOldGenSize :: Word32
  - heapSizeSuggestion :: Word32
  - heapSizeSuggestionAuto :: Bool
  - oldGenFactor :: Double
  - pcFreeHeap :: Double
  - generations :: Word32
  - squeezeUpdFrames :: Bool
  - compact :: Bool
  - compactThreshold :: Double
  - sweep :: Bool
  - ringBell :: Bool
  - idleGCDelayTime :: RtsTime
  - doIdleGC :: Bool
  - heapBase :: Word
  - allocLimitGrace :: Word
  - numa :: Bool
  - numaMask :: Word
  }
- data ConcFlags = ConcFlags {
  - ctxtSwitchTime :: RtsTime
  - ctxtSwitchTicks :: Int
  }
- data MiscFlags = MiscFlags {
  - tickInterval :: RtsTime
  - installSignalHandlers :: Bool
  - installSEHHandlers :: Bool
  - generateCrashDumpFile :: Bool
  - generateStackTrace :: 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
  - | CostCentresJSON
- 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
  }
- data ParFlags = ParFlags {
  - nCapabilities :: Word32
  - migrate :: Bool
  - maxLocalSparks :: Word32
  - parGcEnabled :: Bool
  - parGcGen :: Word32
  - parGcLoadBalancingEnabled :: Bool
  - parGcLoadBalancingGen :: Word32
  - parGcNoSyncWithIdle :: Word32
  - parGcThreads :: Word32
  - setAffinity :: Bool
  }
- 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
- getParFlags :: IO ParFlags

# Documentation

type RtsTime = Word64 #

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

Since: base-4.8.2.0

data RTSFlags #

Parameters of the runtime system

Since: base-4.8.0.0

Constructors

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

Instances

Show RTSFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> RTSFlags -> ShowS # show :: RTSFlags -> String # showList :: [RTSFlags] -> ShowS #

data GiveGCStats #

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

Since: base-4.8.2.0

Constructors

NoGCStats |
CollectGCStats |
OneLineGCStats |
SummaryGCStats |
VerboseGCStats |

Instances

Enum GiveGCStats # | Since: base-4.8.0.0
Instance details Defined in GHC.RTS.Flags Methods succ :: GiveGCStats -> GiveGCStats # pred :: GiveGCStats -> GiveGCStats # toEnum :: Int -> GiveGCStats # fromEnum :: GiveGCStats -> Int # enumFrom :: GiveGCStats -> [GiveGCStats] # enumFromThen :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromTo :: GiveGCStats -> GiveGCStats -> [GiveGCStats] # enumFromThenTo :: GiveGCStats -> GiveGCStats -> GiveGCStats -> [GiveGCStats] #
Show GiveGCStats # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> GiveGCStats -> ShowS # show :: GiveGCStats -> String # showList :: [GiveGCStats] -> ShowS #

data GCFlags #

Parameters of the garbage collector.

Since: base-4.8.0.0

Constructors

GCFlags |
Fields statsFile :: Maybe FilePath giveStats :: GiveGCStats maxStkSize :: Word32 initialStkSize :: Word32 stkChunkSize :: Word32 stkChunkBufferSize :: Word32 maxHeapSize :: Word32 minAllocAreaSize :: Word32 largeAllocLim :: Word32 nurseryChunkSize :: Word32 minOldGenSize :: Word32 heapSizeSuggestion :: Word32 heapSizeSuggestionAuto :: Bool oldGenFactor :: Double pcFreeHeap :: Double generations :: Word32 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 idleGCDelayTime :: RtsTime doIdleGC :: Bool heapBase :: Word address to ask the OS for memory allocLimitGrace :: Word numa :: Bool numaMask :: Word

Instances

Show GCFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> GCFlags -> ShowS # show :: GCFlags -> String # showList :: [GCFlags] -> ShowS #

data ConcFlags #

Parameters concerning context switching

Since: base-4.8.0.0

Constructors

ConcFlags |
Fields ctxtSwitchTime :: RtsTime ctxtSwitchTicks :: Int

Instances

Show ConcFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> ConcFlags -> ShowS # show :: ConcFlags -> String # showList :: [ConcFlags] -> ShowS #

data MiscFlags #

Miscellaneous parameters

Since: base-4.8.0.0

Constructors

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

Instances

Show MiscFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> MiscFlags -> ShowS # show :: MiscFlags -> String # showList :: [MiscFlags] -> ShowS #

data DebugFlags #

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

Since: base-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 # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> DebugFlags -> ShowS # show :: DebugFlags -> String # showList :: [DebugFlags] -> ShowS #

data DoCostCentres #

Should the RTS produce a cost-center summary?

Since: base-4.8.2.0

Constructors

CostCentresNone |
CostCentresSummary |
CostCentresVerbose |
CostCentresAll |
CostCentresJSON |

Instances

Enum DoCostCentres # | Since: base-4.8.0.0
Instance details Defined in GHC.RTS.Flags Methods succ :: DoCostCentres -> DoCostCentres # pred :: DoCostCentres -> DoCostCentres # toEnum :: Int -> DoCostCentres # fromEnum :: DoCostCentres -> Int # enumFrom :: DoCostCentres -> [DoCostCentres] # enumFromThen :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromTo :: DoCostCentres -> DoCostCentres -> [DoCostCentres] # enumFromThenTo :: DoCostCentres -> DoCostCentres -> DoCostCentres -> [DoCostCentres] #
Show DoCostCentres # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> DoCostCentres -> ShowS # show :: DoCostCentres -> String # showList :: [DoCostCentres] -> ShowS #

data CCFlags #

Parameters pertaining to the cost-center profiler.

Since: base-4.8.0.0

Constructors

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

Instances

Show CCFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> CCFlags -> ShowS # show :: CCFlags -> String # showList :: [CCFlags] -> ShowS #

data DoHeapProfile #

What sort of heap profile are we collecting?

Since: base-4.8.2.0

Constructors

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

Instances

Enum DoHeapProfile # | Since: base-4.8.0.0
Instance details Defined in GHC.RTS.Flags Methods succ :: DoHeapProfile -> DoHeapProfile # pred :: DoHeapProfile -> DoHeapProfile # toEnum :: Int -> DoHeapProfile # fromEnum :: DoHeapProfile -> Int # enumFrom :: DoHeapProfile -> [DoHeapProfile] # enumFromThen :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromTo :: DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] # enumFromThenTo :: DoHeapProfile -> DoHeapProfile -> DoHeapProfile -> [DoHeapProfile] #
Show DoHeapProfile # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> DoHeapProfile -> ShowS # show :: DoHeapProfile -> String # showList :: [DoHeapProfile] -> ShowS #

data ProfFlags #

Parameters of the cost-center profiler

Since: base-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 # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> ProfFlags -> ShowS # show :: ProfFlags -> String # showList :: [ProfFlags] -> ShowS #

data DoTrace #

Is event tracing enabled?

Since: base-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 # | Since: base-4.8.0.0
Instance details Defined in GHC.RTS.Flags Methods succ :: DoTrace -> DoTrace # pred :: DoTrace -> DoTrace # toEnum :: Int -> DoTrace # fromEnum :: DoTrace -> Int # enumFrom :: DoTrace -> [DoTrace] # enumFromThen :: DoTrace -> DoTrace -> [DoTrace] # enumFromTo :: DoTrace -> DoTrace -> [DoTrace] # enumFromThenTo :: DoTrace -> DoTrace -> DoTrace -> [DoTrace] #
Show DoTrace # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> DoTrace -> ShowS # show :: DoTrace -> String # showList :: [DoTrace] -> ShowS #

data TraceFlags #

Parameters pertaining to event tracing

Since: base-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 # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> TraceFlags -> ShowS # show :: TraceFlags -> String # showList :: [TraceFlags] -> ShowS #

data TickyFlags #

Parameters pertaining to ticky-ticky profiler

Since: base-4.8.0.0

Constructors

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

Instances

Show TickyFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> TickyFlags -> ShowS # show :: TickyFlags -> String # showList :: [TickyFlags] -> ShowS #

data ParFlags #

Parameters pertaining to parallelism

Since: base-4.8.0.0

Constructors

ParFlags |
Fields nCapabilities :: Word32 migrate :: Bool maxLocalSparks :: Word32 parGcEnabled :: Bool parGcGen :: Word32 parGcLoadBalancingEnabled :: Bool parGcLoadBalancingGen :: Word32 parGcNoSyncWithIdle :: Word32 parGcThreads :: Word32 setAffinity :: Bool

Instances

Show ParFlags # |
Instance details Defined in GHC.RTS.Flags Methods showsPrec :: Int -> ParFlags -> ShowS # show :: ParFlags -> String # showList :: [ParFlags] -> ShowS #

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 #

getParFlags :: IO ParFlags #