ghc-debug-client-0.6.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

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

prettyProfileKey :: ProfileKey -> Text Source #

Show the full ProfileKey, including package and module locations if available.

prettyShortProfileKey :: ProfileKey -> Text Source #

Show the ProfileKey in a shortened form if possible. For example, it omits package and module locations for ProfileConstrDesc.

newtype Count Source #

Constructors

Count 

Fields

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 #