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

GHC.Debug.Snapshot

Description

Functions for creating and running snapshots.

Synopsis

Generating snapshots

snapshot :: FilePath -> DebugM () Source #

Make a snapshot of the current heap and save it to the given file.

makeSnapshot :: Debuggee -> FilePath -> IO () Source #

Pause the process and create a snapshot of the heap. The snapshot can then be loaded with snapshotRun in order to perform offline analysis.

Using a snapshot

snapshotRun :: FilePath -> (Debuggee -> IO a) -> IO a Source #

Start an analysis session using a snapshot. This will not connect to a debuggee. The snapshot is created by snapshot.

Low level

traceFrom :: [ClosurePtr] -> DebugM () Source #

Traverse the tree from GC roots, to populate the caches with everything necessary.