Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Functions for analysing memory fragmentation
Synopsis
- summariseBlocks :: [RawBlock] -> IO ()
- censusByMBlock :: [ClosurePtr] -> DebugM (Map BlockPtr CensusStats)
- printMBlockCensus :: Map BlockPtr CensusStats -> IO ()
- censusByBlock :: [ClosurePtr] -> DebugM (Map BlockPtr CensusStats)
- printBlockCensus :: Map BlockPtr CensusStats -> IO ()
- censusPinnedBlocks :: [RawBlock] -> [ClosurePtr] -> DebugM (Map BlockPtr PinnedCensusStats)
- newtype PinnedCensusStats = PinnedCensusStats (CensusStats, [(ClosurePtr, SizedClosure)])
- findBadPtrs :: Map k PinnedCensusStats -> [((Count, [ClosurePtr]), String)]
- histogram :: Word64 -> [CensusStats] -> IO ()
Documentation
summariseBlocks :: [RawBlock] -> IO () Source #
Print a summary of the given raw blocks This is useful to see how many MBlocks and how many pinned blocks there are.
censusByMBlock :: [ClosurePtr] -> DebugM (Map BlockPtr CensusStats) Source #
Perform a heap census by which MBlock each closure lives in
printMBlockCensus :: Map BlockPtr CensusStats -> IO () Source #
censusByBlock :: [ClosurePtr] -> DebugM (Map BlockPtr CensusStats) Source #
Perform a census based on which block each closure resides in.
printBlockCensus :: Map BlockPtr CensusStats -> IO () Source #
Print out a block census
censusPinnedBlocks :: [RawBlock] -> [ClosurePtr] -> DebugM (Map BlockPtr PinnedCensusStats) Source #
Only census the given (pinned) blocks
newtype PinnedCensusStats Source #
Instances
Semigroup PinnedCensusStats Source # | |
Defined in GHC.Debug.Fragmentation (<>) :: PinnedCensusStats -> PinnedCensusStats -> PinnedCensusStats # sconcat :: NonEmpty PinnedCensusStats -> PinnedCensusStats # stimes :: Integral b => b -> PinnedCensusStats -> PinnedCensusStats # |
findBadPtrs :: Map k PinnedCensusStats -> [((Count, [ClosurePtr]), String)] Source #
Given a pinned block census, find the ARR_WORDS objects which are in the blocks which are < 10 % utilised. The return list is sorted by how many times each distinct ARR_WORDS appears on the heap.