{-# OPTIONS_GHC -optc-DPROFILING #-}
{-# LINE 1 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
module GHC.Exts.Heap.InfoTableProf
( module GHC.Exts.Heap.InfoTable.Types
, itblSize
, peekItbl
, pokeItbl
) where
import GHC.Exts.Heap.InfoTable.Types
{-# LINE 16 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
import GHC.Exts.Heap.Constants
import Data.Maybe
{-# LINE 19 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
import Foreign
peekItbl :: Ptr StgInfoTable -> IO StgInfoTable
peekItbl a0 = do
{-# LINE 28 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
let ptr = a0 `plusPtr` (negate wORD_SIZE)
entry' <- Just <$> ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 30 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 34 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
ptrs' <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 35 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
nptrs' <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 36 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
tipe' <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 37 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 38 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
srtlen' <- ((\hsc_ptr -> peekByteOff hsc_ptr 36)) a0
{-# LINE 39 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 42 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
return StgInfoTable
{ entry = entry'
, ptrs = ptrs'
, nptrs = nptrs'
, tipe = toEnum (fromIntegral (tipe' :: HalfWord))
, srtlen = srtlen'
, code = Nothing
}
pokeItbl :: Ptr StgInfoTable -> StgInfoTable -> IO ()
pokeItbl a0 itbl = do
{-# LINE 54 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) a0 (fromJust (entry itbl))
{-# LINE 55 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 56 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) a0 (ptrs itbl)
{-# LINE 57 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 28)) a0 (nptrs itbl)
{-# LINE 58 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) a0 (fromEnum (tipe itbl))
{-# LINE 59 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 60 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 36)) a0 (srtlen itbl)
{-# LINE 61 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 64 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
{-# LINE 71 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}
itblSize :: Int
itblSize = ((40))
{-# LINE 74 "libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc" #-}