ghc-events-0.8.0.1: Library and tool for parsing .eventlog files from GHC

Safe HaskellNone
LanguageHaskell98

GHC.RTS.Events.Analysis.Capability

Synopsis

Documentation

capabilityThreadPoolMachine :: Machine (Map ThreadId Int) Event Source #

This state machine tracks threads residing on capabilities. Each thread can only reside on one capability, but can be migrated between them.

capabilityThreadRunMachine :: Machine (Map Int ThreadId) Event Source #

This state machine tracks threads running on capabilities, only one thread may run on a capability at a time.

capabilityTaskPoolMachine :: Machine (Map TaskId Int) Event Source #

This state machine tracks Haskell tasks, represented by TaskId, residing on capabilities. Each Haskell task can only reside on one capability, but can be migrated between them.

capabilityTaskOSMachine :: Machine (Map KernelThreadId Int, Map TaskId KernelThreadId) Event Source #

This state machine tracks Haskell tasks (represented by the KernelThreadId of their OS thread) residing on capabilities and additionally tracks the (immutable) assignment of OS thread ids (KernelThreadId) to tasks ids (TaskId). Each Haskell task can only reside on one capability, but can be migrated between them.

Invariant for the (Map KernelThreadId Int, Map TaskId KernelThreadId) type: the second map is an injection (verified by the machine in insertTaskOS) and the following sets are equal: keys of the fist map and values of the second (follows from the construction of the maps by the machine).

The machine verifies as much as capabilityTaskPoolMachine and additionally the data invariant, and offers a richer verification profile.