ghc-debug-client-0.4.0.0: Useful functions for writing heap analysis tools which use ghc-debug.
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Debug.Profile

Description

Functions for performing whole heap census in the style of the normal - heap profiling

Synopsis

Documentation

profile :: FilePath -> Int -> Debuggee -> IO () Source #

Peform a profile at the given interval (in seconds), the result will be rendered after each iteration using eventlog2html.

censusClosureType :: [ClosurePtr] -> DebugM CensusByClosureType Source #

Perform a heap census in the same style as the -hT profile.

census2LevelClosureType :: [ClosurePtr] -> DebugM CensusByClosureType Source #

Perform a 2-level census where the keys are the type of the closure in addition to the type of ptrs of the closure. This can be used to distinguish between lists of different type for example.

closureCensusBy :: forall k v. (Semigroup v, Ord k) => (ClosurePtr -> SizedClosure -> DebugM (Maybe (k, v))) -> [ClosurePtr] -> DebugM (Map k v) Source #

General function for performing a heap census in constant memory

newtype Count Source #

Constructors

Count Int 

Instances

Instances details
Monoid Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Methods

mempty :: Count #

mappend :: Count -> Count -> Count #

mconcat :: [Count] -> Count #

Semigroup Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Methods

(<>) :: Count -> Count -> Count #

sconcat :: NonEmpty Count -> Count #

stimes :: Integral b => b -> Count -> Count #

Num Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Show Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Methods

showsPrec :: Int -> Count -> ShowS #

show :: Count -> String #

showList :: [Count] -> ShowS #

Eq Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Methods

(==) :: Count -> Count -> Bool #

(/=) :: Count -> Count -> Bool #

Ord Count Source # 
Instance details

Defined in GHC.Debug.Profile.Types

Methods

compare :: Count -> Count -> Ordering #

(<) :: Count -> Count -> Bool #

(<=) :: Count -> Count -> Bool #

(>) :: Count -> Count -> Bool #

(>=) :: Count -> Count -> Bool #

max :: Count -> Count -> Count #

min :: Count -> Count -> Count #