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

Safe HaskellSafe-Inferred

GHC.RTS.Events.Analysis.Capability

Synopsis

Documentation

capabilityThreadPoolMachine :: Machine (Map ThreadId Int) CapEventSource

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) CapEventSource

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

capabilityTaskPoolMachine :: Machine (Map TaskId Int) CapEventSource

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) CapEventSource

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.