{-# LINE 1 "libraries/base/GHC/RTS/Flags.hsc" #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
module GHC.RTS.Flags
( RtsTime
, RTSFlags (..)
, GiveGCStats (..)
, GCFlags (..)
, ConcFlags (..)
, MiscFlags (..)
, DebugFlags (..)
, DoCostCentres (..)
, CCFlags (..)
, DoHeapProfile (..)
, ProfFlags (..)
, DoTrace (..)
, TraceFlags (..)
, TickyFlags (..)
, ParFlags (..)
, IoSubSystem (..)
, getRTSFlags
, getGCFlags
, getConcFlags
, getMiscFlags
, getIoManagerFlag
, getDebugFlags
, getCCFlags
, getProfFlags
, getTraceFlags
, getTickyFlags
, getParFlags
) where
import Data.Functor ((<$>))
import Foreign
import Foreign.C
import GHC.Base
import GHC.Enum
import GHC.Generics (Generic)
import GHC.IO
import GHC.Real
import GHC.Show
type RtsTime = Word64
data GiveGCStats
= NoGCStats
| CollectGCStats
| OneLineGCStats
| SummaryGCStats
| VerboseGCStats
deriving ( Show
, Generic
)
instance Enum GiveGCStats where
fromEnum NoGCStats = 0
{-# LINE 79 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum CollectGCStats = 1
{-# LINE 80 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum OneLineGCStats = 2
{-# LINE 81 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum SummaryGCStats = 3
{-# LINE 82 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum VerboseGCStats = 4
{-# LINE 83 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 0 = NoGCStats
{-# LINE 85 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 1 = CollectGCStats
{-# LINE 86 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 2 = OneLineGCStats
{-# LINE 87 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 3 = SummaryGCStats
{-# LINE 88 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 4 = VerboseGCStats
{-# LINE 89 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum e = errorWithoutStackTrace ("invalid enum for GiveGCStats: " ++ show e)
data IoSubSystem
= IoPOSIX
| IoNative
deriving (Eq, Show)
instance Enum IoSubSystem where
fromEnum IoPOSIX = 1
{-# LINE 104 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum IoNative = 0
{-# LINE 105 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 1 = IoPOSIX
{-# LINE 107 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 0 = IoNative
{-# LINE 108 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum e = errorWithoutStackTrace ("invalid enum for IoSubSystem: " ++ show e)
instance Storable IoSubSystem where
sizeOf = sizeOf . fromEnum
alignment = sizeOf . fromEnum
peek ptr = fmap toEnum $ peek (castPtr ptr)
poke ptr v = poke (castPtr ptr) (fromEnum v)
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
} deriving ( Show
, Generic
)
data ConcFlags = ConcFlags
{ ctxtSwitchTime :: RtsTime
, ctxtSwitchTicks :: Int
} deriving ( Show
, Generic
)
data MiscFlags = MiscFlags
{ tickInterval :: RtsTime
, installSignalHandlers :: Bool
, installSEHHandlers :: Bool
, generateCrashDumpFile :: Bool
, generateStackTrace :: Bool
, machineReadable :: Bool
, disableDelayedOsMemoryReturn :: Bool
, internalCounters :: Bool
, linkerAlwaysPic :: Bool
, linkerMemBase :: Word
, ioManager :: IoSubSystem
, numIoWorkerThreads :: Word32
} deriving ( Show
, Generic
)
data DebugFlags = DebugFlags
{ scheduler :: Bool
, interpreter :: Bool
, weak :: Bool
, gccafs :: Bool
, gc :: Bool
, nonmoving_gc :: Bool
, block_alloc :: Bool
, sanity :: Bool
, stable :: Bool
, prof :: Bool
, linker :: Bool
, apply :: Bool
, stm :: Bool
, squeeze :: Bool
, hpc :: Bool
, sparks :: Bool
} deriving ( Show
, Generic
)
data DoCostCentres
= CostCentresNone
| CostCentresSummary
| CostCentresVerbose
| CostCentresAll
| CostCentresJSON
deriving ( Show
, Generic
)
instance Enum DoCostCentres where
fromEnum CostCentresNone = 0
{-# LINE 225 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum CostCentresSummary = 1
{-# LINE 226 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum CostCentresVerbose = 2
{-# LINE 227 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum CostCentresAll = 3
{-# LINE 228 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum CostCentresJSON = 4
{-# LINE 229 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 0 = CostCentresNone
{-# LINE 231 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 1 = CostCentresSummary
{-# LINE 232 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 2 = CostCentresVerbose
{-# LINE 233 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 3 = CostCentresAll
{-# LINE 234 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 4 = CostCentresJSON
{-# LINE 235 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum e = errorWithoutStackTrace ("invalid enum for DoCostCentres: " ++ show e)
data CCFlags = CCFlags
{ doCostCentres :: DoCostCentres
, profilerTicks :: Int
, msecsPerTick :: Int
} deriving ( Show
, Generic
)
data DoHeapProfile
= NoHeapProfiling
| HeapByCCS
| HeapByMod
| HeapByDescr
| HeapByType
| HeapByRetainer
| HeapByLDV
| HeapByClosureType
deriving ( Show
, Generic
)
instance Enum DoHeapProfile where
fromEnum NoHeapProfiling = 0
{-# LINE 267 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByCCS = 1
{-# LINE 268 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByMod = 2
{-# LINE 269 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByDescr = 4
{-# LINE 270 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByType = 5
{-# LINE 271 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByRetainer = 6
{-# LINE 272 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByLDV = 7
{-# LINE 273 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum HeapByClosureType = 8
{-# LINE 274 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 0 = NoHeapProfiling
{-# LINE 276 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 1 = HeapByCCS
{-# LINE 277 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 2 = HeapByMod
{-# LINE 278 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 4 = HeapByDescr
{-# LINE 279 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 5 = HeapByType
{-# LINE 280 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 6 = HeapByRetainer
{-# LINE 281 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 7 = HeapByLDV
{-# LINE 282 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 8 = HeapByClosureType
{-# LINE 283 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum e = errorWithoutStackTrace ("invalid enum for DoHeapProfile: " ++ show e)
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
} deriving ( Show
, Generic
)
data DoTrace
= TraceNone
| TraceEventLog
| TraceStderr
deriving ( Show
, Generic
)
instance Enum DoTrace where
fromEnum TraceNone = 0
{-# LINE 321 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum TraceEventLog = 1
{-# LINE 322 "libraries/base/GHC/RTS/Flags.hsc" #-}
fromEnum TraceStderr = 2
{-# LINE 323 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 0 = TraceNone
{-# LINE 325 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 1 = TraceEventLog
{-# LINE 326 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum 2 = TraceStderr
{-# LINE 327 "libraries/base/GHC/RTS/Flags.hsc" #-}
toEnum e = errorWithoutStackTrace ("invalid enum for DoTrace: " ++ show e)
data TraceFlags = TraceFlags
{ tracing :: DoTrace
, timestamp :: Bool
, traceScheduler :: Bool
, traceGc :: Bool
, traceNonmovingGc
:: Bool
, sparksSampled :: Bool
, sparksFull :: Bool
, user :: Bool
} deriving ( Show
, Generic
)
data TickyFlags = TickyFlags
{ showTickyStats :: Bool
, tickyFile :: Maybe FilePath
} deriving ( Show
, Generic
)
data ParFlags = ParFlags
{ nCapabilities :: Word32
, migrate :: Bool
, maxLocalSparks :: Word32
, parGcEnabled :: Bool
, parGcGen :: Word32
, parGcLoadBalancingEnabled :: Bool
, parGcLoadBalancingGen :: Word32
, parGcNoSyncWithIdle :: Word32
, parGcThreads :: Word32
, setAffinity :: Bool
}
deriving ( Show
, Generic
)
data RTSFlags = RTSFlags
{ gcFlags :: GCFlags
, concurrentFlags :: ConcFlags
, miscFlags :: MiscFlags
, debugFlags :: DebugFlags
, costCentreFlags :: CCFlags
, profilingFlags :: ProfFlags
, traceFlags :: TraceFlags
, tickyFlags :: TickyFlags
, parFlags :: ParFlags
} deriving ( Show
, Generic
)
foreign import ccall "&RtsFlags" rtsFlagsPtr :: Ptr RTSFlags
getRTSFlags :: IO RTSFlags
getRTSFlags = do
RTSFlags <$> getGCFlags
<*> getConcFlags
<*> getMiscFlags
<*> getDebugFlags
<*> getCCFlags
<*> getProfFlags
<*> getTraceFlags
<*> getTickyFlags
<*> getParFlags
peekFilePath :: Ptr () -> IO (Maybe FilePath)
peekFilePath ptr
| ptr == nullPtr = return Nothing
| otherwise = return (Just "<filepath>")
peekCStringOpt :: Ptr CChar -> IO (Maybe String)
peekCStringOpt ptr
| ptr == nullPtr = return Nothing
| otherwise = Just <$> peekCString ptr
getGCFlags :: IO GCFlags
getGCFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 0)) rtsFlagsPtr
{-# LINE 420 "libraries/base/GHC/RTS/Flags.hsc" #-}
GCFlags <$> (peekFilePath =<< (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr)
{-# LINE 421 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toEnum . fromIntegral <$>
((\hsc_ptr -> peekByteOff hsc_ptr 8) ptr :: IO Word32))
{-# LINE 423 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 12) ptr
{-# LINE 424 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 425 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 20) ptr
{-# LINE 426 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 427 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 28) ptr
{-# LINE 428 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 429 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 36) ptr
{-# LINE 430 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr
{-# LINE 431 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 44) ptr
{-# LINE 432 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr
{-# LINE 433 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 52) ptr :: IO CBool))
{-# LINE 435 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr
{-# LINE 436 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 64) ptr
{-# LINE 437 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 76) ptr
{-# LINE 438 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 80) ptr :: IO CBool))
{-# LINE 440 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 81) ptr :: IO CBool))
{-# LINE 442 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 88) ptr
{-# LINE 443 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 96) ptr :: IO CBool))
{-# LINE 445 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 97) ptr :: IO CBool))
{-# LINE 447 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 104) ptr
{-# LINE 448 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 120) ptr :: IO CBool))
{-# LINE 450 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 136) ptr
{-# LINE 451 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 144) ptr
{-# LINE 452 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 160) ptr :: IO CBool))
{-# LINE 454 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 168) ptr
{-# LINE 455 "libraries/base/GHC/RTS/Flags.hsc" #-}
getParFlags :: IO ParFlags
getParFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 400)) rtsFlagsPtr
{-# LINE 459 "libraries/base/GHC/RTS/Flags.hsc" #-}
ParFlags
<$> (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 461 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 4) ptr :: IO CBool))
{-# LINE 463 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 464 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 12) ptr :: IO CBool))
{-# LINE 466 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 467 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 20) ptr :: IO CBool))
{-# LINE 469 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 470 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 28) ptr
{-# LINE 471 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr
{-# LINE 472 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 36) ptr :: IO CBool))
{-# LINE 474 "libraries/base/GHC/RTS/Flags.hsc" #-}
getConcFlags :: IO ConcFlags
getConcFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 176)) rtsFlagsPtr
{-# LINE 478 "libraries/base/GHC/RTS/Flags.hsc" #-}
ConcFlags <$> (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 479 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 480 "libraries/base/GHC/RTS/Flags.hsc" #-}
{-# INLINEABLE getMiscFlags #-}
getMiscFlags :: IO MiscFlags
getMiscFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 192)) rtsFlagsPtr
{-# LINE 485 "libraries/base/GHC/RTS/Flags.hsc" #-}
MiscFlags <$> (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr
{-# LINE 486 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 8) ptr :: IO CBool))
{-# LINE 488 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 9) ptr :: IO CBool))
{-# LINE 490 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 10) ptr :: IO CBool))
{-# LINE 492 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 11) ptr :: IO CBool))
{-# LINE 494 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 12) ptr :: IO CBool))
{-# LINE 496 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 13) ptr :: IO CBool))
{-# LINE 498 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 14) ptr :: IO CBool))
{-# LINE 500 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 15) ptr :: IO CBool))
{-# LINE 502 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 503 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toEnum . fromIntegral
<$> ((\hsc_ptr -> peekByteOff hsc_ptr 24) ptr :: IO Word32))
{-# LINE 505 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (fromIntegral
<$> ((\hsc_ptr -> peekByteOff hsc_ptr 28) ptr :: IO Word32))
{-# LINE 507 "libraries/base/GHC/RTS/Flags.hsc" #-}
{-# INLINE getIoManagerFlag #-}
getIoManagerFlag :: IO IoSubSystem
getIoManagerFlag = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 192)) rtsFlagsPtr
{-# LINE 535 "libraries/base/GHC/RTS/Flags.hsc" #-}
mgrFlag <- ((\hsc_ptr -> peekByteOff hsc_ptr 24) ptr :: IO Word32)
{-# LINE 536 "libraries/base/GHC/RTS/Flags.hsc" #-}
return $ (toEnum . fromIntegral) mgrFlag
getDebugFlags :: IO DebugFlags
getDebugFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 224)) rtsFlagsPtr
{-# LINE 541 "libraries/base/GHC/RTS/Flags.hsc" #-}
DebugFlags <$> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 0) ptr :: IO CBool))
{-# LINE 543 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 1) ptr :: IO CBool))
{-# LINE 545 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 2) ptr :: IO CBool))
{-# LINE 547 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 3) ptr :: IO CBool))
{-# LINE 549 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 4) ptr :: IO CBool))
{-# LINE 551 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 5) ptr :: IO CBool))
{-# LINE 553 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 6) ptr :: IO CBool))
{-# LINE 555 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 7) ptr :: IO CBool))
{-# LINE 557 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 9) ptr :: IO CBool))
{-# LINE 559 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 10) ptr :: IO CBool))
{-# LINE 561 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 11) ptr :: IO CBool))
{-# LINE 563 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 12) ptr :: IO CBool))
{-# LINE 565 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 13) ptr :: IO CBool))
{-# LINE 567 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 14) ptr :: IO CBool))
{-# LINE 569 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 15) ptr :: IO CBool))
{-# LINE 571 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 16) ptr :: IO CBool))
{-# LINE 573 "libraries/base/GHC/RTS/Flags.hsc" #-}
getCCFlags :: IO CCFlags
getCCFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 0)) rtsFlagsPtr
{-# LINE 577 "libraries/base/GHC/RTS/Flags.hsc" #-}
CCFlags <$> (toEnum . fromIntegral
<$> ((\hsc_ptr -> peekByteOff hsc_ptr 0) ptr :: IO Word32))
{-# LINE 579 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 4) ptr
{-# LINE 580 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 581 "libraries/base/GHC/RTS/Flags.hsc" #-}
getProfFlags :: IO ProfFlags
getProfFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 272)) rtsFlagsPtr
{-# LINE 585 "libraries/base/GHC/RTS/Flags.hsc" #-}
ProfFlags <$> (toEnum <$> (\hsc_ptr -> peekByteOff hsc_ptr 0) ptr)
{-# LINE 586 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr
{-# LINE 587 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 16) ptr
{-# LINE 588 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 20) ptr :: IO CBool))
{-# LINE 590 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 21) ptr :: IO CBool))
{-# LINE 592 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 24) ptr
{-# LINE 593 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (\hsc_ptr -> peekByteOff hsc_ptr 28) ptr
{-# LINE 594 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 32) ptr)
{-# LINE 595 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 40) ptr)
{-# LINE 596 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 48) ptr)
{-# LINE 597 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 56) ptr)
{-# LINE 598 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 64) ptr)
{-# LINE 599 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 72) ptr)
{-# LINE 600 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekCStringOpt =<< (\hsc_ptr -> peekByteOff hsc_ptr 80) ptr)
{-# LINE 601 "libraries/base/GHC/RTS/Flags.hsc" #-}
getTraceFlags :: IO TraceFlags
getTraceFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 360)) rtsFlagsPtr
{-# LINE 605 "libraries/base/GHC/RTS/Flags.hsc" #-}
TraceFlags <$> (toEnum . fromIntegral
<$> ((\hsc_ptr -> peekByteOff hsc_ptr 0) ptr :: IO CInt))
{-# LINE 607 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 4) ptr :: IO CBool))
{-# LINE 609 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 5) ptr :: IO CBool))
{-# LINE 611 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 6) ptr :: IO CBool))
{-# LINE 613 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 7) ptr :: IO CBool))
{-# LINE 615 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 8) ptr :: IO CBool))
{-# LINE 617 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 9) ptr :: IO CBool))
{-# LINE 619 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 10) ptr :: IO CBool))
{-# LINE 621 "libraries/base/GHC/RTS/Flags.hsc" #-}
getTickyFlags :: IO TickyFlags
getTickyFlags = do
let ptr = ((\hsc_ptr -> hsc_ptr `plusPtr` 384)) rtsFlagsPtr
{-# LINE 625 "libraries/base/GHC/RTS/Flags.hsc" #-}
TickyFlags <$> (toBool <$>
((\hsc_ptr -> peekByteOff hsc_ptr 0) ptr :: IO CBool))
{-# LINE 627 "libraries/base/GHC/RTS/Flags.hsc" #-}
<*> (peekFilePath =<< (\hsc_ptr -> peekByteOff hsc_ptr 8) ptr)
{-# LINE 628 "libraries/base/GHC/RTS/Flags.hsc" #-}