CgProf

ghc-7.6.3: The GHC API

Safe Haskell | None

CgProf

Synopsis

- mkCCostCentre :: CostCentre -> CmmLit
- mkCCostCentreStack :: CostCentreStack -> CmmLit
- dynProfHdr :: CmmExpr -> [CmmExpr]
- profDynAlloc :: ClosureInfo -> CmmExpr -> Code
- profAlloc :: CmmExpr -> CmmExpr -> Code
- staticProfHdr :: CostCentreStack -> [CmmLit]
- initUpdFrameProf :: CmmExpr -> Code
- enterCostCentreThunk :: CmmExpr -> Code
- enterCostCentreFun :: CostCentreStack -> CmmExpr -> [GlobalReg] -> Code
- costCentreFrom :: CmmExpr -> CmmExpr
- curCCS :: CmmExpr
- storeCurCCS :: CmmExpr -> CmmStmt
- emitCostCentreDecl :: CostCentre -> Code
- emitCostCentreStackDecl :: CostCentreStack -> Code
- emitSetCCC :: CostCentre -> Bool -> Bool -> Code
- ldvEnter :: CmmExpr -> Code
- ldvEnterClosure :: ClosureInfo -> Code
- ldvRecordCreate :: CmmExpr -> Code

# Documentation

mkCCostCentre :: CostCentre -> CmmLit

mkCCostCentreStack :: CostCentreStack -> CmmLit

dynProfHdr :: CmmExpr -> [CmmExpr]

profDynAlloc :: ClosureInfo -> CmmExpr -> Code

Record the allocation of a closure. The CmmExpr is the cost centre stack to which to attribute the allocation.

profAlloc :: CmmExpr -> CmmExpr -> Code

Record the allocation of a closure (size is given by a CmmExpr) The size must be in words, because the allocation counter in a CCS counts in words.

This API is used by the `CCS_ALLOC()` macro in `.cmm` code.

staticProfHdr :: CostCentreStack -> [CmmLit]

initUpdFrameProf :: CmmExpr -> Code

enterCostCentreThunk :: CmmExpr -> Code

enterCostCentreFun :: CostCentreStack -> CmmExpr -> [GlobalReg] -> Code

costCentreFrom :: CmmExpr -> CmmExpr

curCCS :: CmmExpr

storeCurCCS :: CmmExpr -> CmmStmt

emitCostCentreDecl :: CostCentre -> Code

emitCostCentreStackDecl :: CostCentreStack -> Code

emitSetCCC :: CostCentre -> Bool -> Bool -> Code

ldvEnter :: CmmExpr -> Code

ldvEnterClosure :: ClosureInfo -> Code

ldvRecordCreate :: CmmExpr -> Code