Skip to content
Snippets Groups Projects
Commit 3d424607 authored by Ben Gamari's avatar Ben Gamari
Browse files

base: Add Haddocks to GHC.RTS.Flags

parent f52dd047
No related branches found
No related tags found
No related merge requests found
...@@ -54,11 +54,19 @@ import GHC.Show ...@@ -54,11 +54,19 @@ import GHC.Show
import GHC.Word import GHC.Word
-- | @'Time'@ is defined as a @'StgWord64'@ in @stg/Types.h@ -- | @'Time'@ is defined as a @'StgWord64'@ in @stg/Types.h@
--
-- @since 4.8.2.0
type RtsTime = Word64 type RtsTime = Word64
-- | @'nat'@ defined in @rts/Types.h@ -- | @'nat'@ defined in @rts/Types.h@
--
-- @since 4.8.2.0
type RtsNat = #{type unsigned int} type RtsNat = #{type unsigned int}
-- | Should we produce a summary of the garbage collector statistics after the
-- program has exited?
--
-- @since 4.8.2.0
data GiveGCStats data GiveGCStats
= NoGCStats = NoGCStats
| CollectGCStats | CollectGCStats
...@@ -81,6 +89,9 @@ instance Enum GiveGCStats where ...@@ -81,6 +89,9 @@ instance Enum GiveGCStats where
toEnum #{const VERBOSE_GC_STATS} = VerboseGCStats toEnum #{const VERBOSE_GC_STATS} = VerboseGCStats
toEnum e = error ("invalid enum for GiveGCStats: " ++ show e) toEnum e = error ("invalid enum for GiveGCStats: " ++ show e)
-- | Parameters of the garbage collector.
--
-- @since 4.8.0.0
data GCFlags = GCFlags data GCFlags = GCFlags
{ statsFile :: Maybe FilePath { statsFile :: Maybe FilePath
, giveStats :: GiveGCStats , giveStats :: GiveGCStats
...@@ -110,11 +121,17 @@ data GCFlags = GCFlags ...@@ -110,11 +121,17 @@ data GCFlags = GCFlags
, allocLimitGrace :: Word , allocLimitGrace :: Word
} deriving (Show) } deriving (Show)
-- | Parameters concerning context switching
--
-- @since 4.8.0.0
data ConcFlags = ConcFlags data ConcFlags = ConcFlags
{ ctxtSwitchTime :: RtsTime { ctxtSwitchTime :: RtsTime
, ctxtSwitchTicks :: Int , ctxtSwitchTicks :: Int
} deriving (Show) } deriving (Show)
-- | Miscellaneous parameters
--
-- @since 4.8.0.0
data MiscFlags = MiscFlags data MiscFlags = MiscFlags
{ tickInterval :: RtsTime { tickInterval :: RtsTime
, installSignalHandlers :: Bool , installSignalHandlers :: Bool
...@@ -125,6 +142,8 @@ data MiscFlags = MiscFlags ...@@ -125,6 +142,8 @@ data MiscFlags = MiscFlags
-- | Flags to control debugging output & extra checking in various -- | Flags to control debugging output & extra checking in various
-- subsystems. -- subsystems.
--
-- @since 4.8.0.0
data DebugFlags = DebugFlags data DebugFlags = DebugFlags
{ scheduler :: Bool -- ^ 's' { scheduler :: Bool -- ^ 's'
, interpreter :: Bool -- ^ 'i' , interpreter :: Bool -- ^ 'i'
...@@ -143,6 +162,9 @@ data DebugFlags = DebugFlags ...@@ -143,6 +162,9 @@ data DebugFlags = DebugFlags
, sparks :: Bool -- ^ 'r' , sparks :: Bool -- ^ 'r'
} deriving (Show) } deriving (Show)
-- | Should the RTS produce a cost-center summary?
--
-- @since 4.8.2.0
data DoCostCentres data DoCostCentres
= CostCentresNone = CostCentresNone
| CostCentresSummary | CostCentresSummary
...@@ -165,12 +187,18 @@ instance Enum DoCostCentres where ...@@ -165,12 +187,18 @@ instance Enum DoCostCentres where
toEnum #{const COST_CENTRES_XML} = CostCentresXML toEnum #{const COST_CENTRES_XML} = CostCentresXML
toEnum e = error ("invalid enum for DoCostCentres: " ++ show e) toEnum e = error ("invalid enum for DoCostCentres: " ++ show e)
-- | Parameters pertaining to the cost-center profiler.
--
-- @since 4.8.0.0
data CCFlags = CCFlags data CCFlags = CCFlags
{ doCostCentres :: DoCostCentres { doCostCentres :: DoCostCentres
, profilerTicks :: Int , profilerTicks :: Int
, msecsPerTick :: Int , msecsPerTick :: Int
} deriving (Show) } deriving (Show)
-- | What sort of heap profile are we collecting?
--
-- @since 4.8.2.0
data DoHeapProfile data DoHeapProfile
= NoHeapProfiling = NoHeapProfiling
| HeapByCCS | HeapByCCS
...@@ -202,6 +230,9 @@ instance Enum DoHeapProfile where ...@@ -202,6 +230,9 @@ instance Enum DoHeapProfile where
toEnum #{const HEAP_BY_CLOSURE_TYPE} = HeapByClosureType toEnum #{const HEAP_BY_CLOSURE_TYPE} = HeapByClosureType
toEnum e = error ("invalid enum for DoHeapProfile: " ++ show e) toEnum e = error ("invalid enum for DoHeapProfile: " ++ show e)
-- | Parameters of the cost-center profiler
--
-- @since 4.8.0.0
data ProfFlags = ProfFlags data ProfFlags = ProfFlags
{ doHeapProfile :: DoHeapProfile { doHeapProfile :: DoHeapProfile
, heapProfileInterval :: RtsTime -- ^ time between samples , heapProfileInterval :: RtsTime -- ^ time between samples
...@@ -219,10 +250,13 @@ data ProfFlags = ProfFlags ...@@ -219,10 +250,13 @@ data ProfFlags = ProfFlags
, bioSelector :: Maybe String , bioSelector :: Maybe String
} deriving (Show) } deriving (Show)
-- | Is event tracing enabled?
--
-- @since 4.8.2.0
data DoTrace data DoTrace
= TraceNone = TraceNone -- ^ no tracing
| TraceEventLog | TraceEventLog -- ^ send tracing events to the event log
| TraceStderr | TraceStderr -- ^ send tracing events to @stderr@
deriving (Show) deriving (Show)
instance Enum DoTrace where instance Enum DoTrace where
...@@ -235,6 +269,9 @@ instance Enum DoTrace where ...@@ -235,6 +269,9 @@ instance Enum DoTrace where
toEnum #{const TRACE_STDERR} = TraceStderr toEnum #{const TRACE_STDERR} = TraceStderr
toEnum e = error ("invalid enum for DoTrace: " ++ show e) toEnum e = error ("invalid enum for DoTrace: " ++ show e)
-- | Parameters pertaining to event tracing
--
-- @since 4.8.0.0
data TraceFlags = TraceFlags data TraceFlags = TraceFlags
{ tracing :: DoTrace { tracing :: DoTrace
, timestamp :: Bool -- ^ show timestamp in stderr output , timestamp :: Bool -- ^ show timestamp in stderr output
...@@ -245,11 +282,17 @@ data TraceFlags = TraceFlags ...@@ -245,11 +282,17 @@ data TraceFlags = TraceFlags
, user :: Bool -- ^ trace user events (emitted from Haskell code) , user :: Bool -- ^ trace user events (emitted from Haskell code)
} deriving (Show) } deriving (Show)
-- | Parameters pertaining to ticky-ticky profiler
--
-- @since 4.8.0.0
data TickyFlags = TickyFlags data TickyFlags = TickyFlags
{ showTickyStats :: Bool { showTickyStats :: Bool
, tickyFile :: Maybe FilePath , tickyFile :: Maybe FilePath
} deriving (Show) } deriving (Show)
-- | Parameters of the runtime system
--
-- @since 4.8.0.0
data RTSFlags = RTSFlags data RTSFlags = RTSFlags
{ gcFlags :: GCFlags { gcFlags :: GCFlags
, concurrentFlags :: ConcFlags , concurrentFlags :: ConcFlags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment