ghc-events-0.20.0.0: Library and tool for parsing .eventlog files from GHC
Safe HaskellNone
LanguageHaskell2010

GHC.RTS.Events

Synopsis

The event log types

data EventLog Source #

Constructors

EventLog 

Fields

Instances

Instances details
Show EventLog Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> EventLog -> ShowS

show :: EventLog -> String

showList :: [EventLog] -> ShowS

newtype Header Source #

Constructors

Header 

Fields

Instances

Instances details
Show Header Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> Header -> ShowS

show :: Header -> String

showList :: [Header] -> ShowS

Eq Header Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

(==) :: Header -> Header -> Bool

(/=) :: Header -> Header -> Bool

data Data Source #

Constructors

Data 

Fields

Instances

Instances details
Show Data Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> Data -> ShowS

show :: Data -> String

showList :: [Data] -> ShowS

data EventType Source #

Constructors

EventType 

Fields

Instances

Instances details
Show EventType Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> EventType -> ShowS

show :: EventType -> String

showList :: [EventType] -> ShowS

Eq EventType Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

(==) :: EventType -> EventType -> Bool

(/=) :: EventType -> EventType -> Bool

data Event Source #

Constructors

Event 

Fields

Instances

Instances details
Show Event Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> Event -> ShowS

show :: Event -> String

showList :: [Event] -> ShowS

data EventInfo Source #

Constructors

EventBlock 

Fields

UnknownEvent 

Fields

Startup 

Fields

Shutdown 
CreateThread 

Fields

RunThread 

Fields

StopThread 
ThreadRunnable 

Fields

MigrateThread 

Fields

WakeupThread 

Fields

ThreadLabel 

Fields

CreateSparkThread 

Fields

SparkCounters 

Fields

SparkCreate 
SparkDud 
SparkOverflow 
SparkRun 
SparkSteal 

Fields

SparkFizzle 
SparkGC 
TaskCreate 

Fields

TaskMigrate 

Fields

TaskDelete 

Fields

RequestSeqGC 
RequestParGC 
StartGC 
GCWork 
GCIdle 
GCDone 
EndGC 
GlobalSyncGC 
GCStatsGHC 

Fields

MemReturn 

Fields

HeapAllocated 

Fields

HeapSize 

Fields

BlocksSize 

Fields

HeapLive 

Fields

HeapInfoGHC 

Fields

CapCreate 

Fields

CapDelete 

Fields

CapDisable 

Fields

CapEnable 

Fields

CapsetCreate 
CapsetDelete 

Fields

CapsetAssignCap 

Fields

CapsetRemoveCap 

Fields

RtsIdentifier 

Fields

ProgramArgs 

Fields

ProgramEnv 

Fields

OsProcessPid 

Fields

OsProcessParentPid 

Fields

WallClockTime 

Fields

Message 

Fields

UserMessage 

Fields

UserMarker 

Fields

Version 

Fields

ProgramInvocation 

Fields

CreateMachine 
KillMachine 

Fields

CreateProcess 

Fields

KillProcess 

Fields

AssignThreadToProcess 

Fields

EdenStartReceive 
EdenEndReceive 
SendMessage 
ReceiveMessage 
SendReceiveLocalMessage 
InternString 

Fields

MerStartParConjunction 
MerEndParConjunction 

Fields

MerEndParConjunct 

Fields

MerCreateSpark 
MerFutureCreate 
MerFutureWaitNosuspend 

Fields

MerFutureWaitSuspended 

Fields

MerFutureSignal 

Fields

MerLookingForGlobalThread 
MerWorkStealing 
MerLookingForLocalSpark 
MerReleaseThread 

Fields

MerCapSleeping 
MerCallingMain 
PerfName 

Fields

PerfCounter 

Fields

PerfTracepoint 
HeapProfBegin 
HeapProfCostCentre 

Fields

InfoTableProv 

Fields

HeapProfSampleBegin 

Fields

HeapProfSampleEnd 

Fields

HeapBioProfSampleBegin 

Fields

HeapProfSampleCostCentre 

Fields

HeapProfSampleString 

Fields

ProfSampleCostCentre 

Fields

ProfBegin 

Fields

UserBinaryMessage 

Fields

ConcMarkBegin 
ConcMarkEnd 

Fields

ConcSyncBegin 
ConcSyncEnd 
ConcSweepBegin 
ConcSweepEnd 
ConcUpdRemSetFlush 

Fields

NonmovingHeapCensus 
NonmovingPrunedSegments 

Fields

  • nonmovingPrunedSegments :: !Word32

    The number of pruned segments.

  • nonmovingFreeSegments :: !Word32

    The number of leftover free segments. These could not be pruned as they belong to megablocks with at least one non-free segment.

TickyCounterDef 

Fields

TickyCounterSample 

Fields

TickyBeginSample 

Instances

Instances details
Show EventInfo Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> EventInfo -> ShowS

show :: EventInfo -> String

showList :: [EventInfo] -> ShowS

data CapsetType Source #

Instances

Instances details
Show CapsetType Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> CapsetType -> ShowS

show :: CapsetType -> String

showList :: [CapsetType] -> ShowS

newtype HeapProfFlags Source #

Constructors

HeapProfFlags Word8 

Instances

Instances details
Binary HeapProfFlags Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

put :: HeapProfFlags -> Put

get :: Get HeapProfFlags

putList :: [HeapProfFlags] -> Put

Show HeapProfFlags Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> HeapProfFlags -> ShowS

show :: HeapProfFlags -> String

showList :: [HeapProfFlags] -> ShowS

type Timestamp = Word64 Source #

type ThreadId = Word32 Source #

type TaskId = Word64 Source #

newtype KernelThreadId Source #

Constructors

KernelThreadId 

Fields

Instances

Instances details
Binary KernelThreadId Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

put :: KernelThreadId -> Put

get :: Get KernelThreadId

putList :: [KernelThreadId] -> Put

Show KernelThreadId Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> KernelThreadId -> ShowS

show :: KernelThreadId -> String

showList :: [KernelThreadId] -> ShowS

Eq KernelThreadId Source # 
Instance details

Defined in GHC.RTS.EventTypes

Ord KernelThreadId Source # 
Instance details

Defined in GHC.RTS.EventTypes

type EventTypeNum = Word16 Source #

type EventTypeDesc = Text Source #

type EventTypeSize = Word16 Source #

type BlockSize = Word32 Source #

type Capset = Word32 Source #

type PID = Word32 Source #

type StringId = Word32 Source #

type ProcessId = Word32 Source #

type MachineId = Word16 Source #

type MessageSize = Word32 Source #

type ParConjDynId = Word64 Source #

type SparkId = Word32 Source #

type FutureId = Word64 Source #

type PerfEventTypeNum = Word32 Source #

Reading and writing event logs

readEventLogFromFile :: FilePath -> IO (Either String EventLog) Source #

Read an entire event log file. It returns an error message if it encounters an error while decoding.

Note that it doesn't fail if it consumes all input in the middle of decoding of an event.

writeEventLogToFile :: FilePath -> EventLog -> IO () Source #

Writes the EventLog to file. The log is expected to NOT have EventBlock markers/events - the parsers no longer emit them and they are handled behind the scenes.

serialiseEventLog :: EventLog -> ByteString Source #

Serialises an EventLog back to a ByteString, usually for writing it back to a file.

Utilities

data CapEvent Source #

Deprecated: CapEvents will be removed soon, now Event has a field evCap

An event annotated with the Capability that generated it, if any

Constructors

CapEvent

Deprecated: CapEvents will be removed soon, now Event has a field evCap

Fields

Instances

Instances details
Show CapEvent Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

showsPrec :: Int -> CapEvent -> ShowS

show :: CapEvent -> String

showList :: [CapEvent] -> ShowS

Printing

data TimeFormat Source #

How to format event timestamps

Constructors

RawTime 
PrettyTime 

printEventsIncremental Source #

Arguments

:: Bool

Follow the file or not

-> FilePath 
-> IO () 

Read an event log file and pretty print it to stdout

ppEvent Source #

Arguments

:: TimeFormat 
-> IntMap EventType

Look up UnknownEvent.ref to find a suitable description.

-> Event 
-> String 

Pretty prints an Event, with clean handling for UnknownEvent

buildEvent :: TimeFormat -> IntMap EventType -> Event -> Builder Source #

buildEvent' :: Event -> Builder Source #

Perf events

For compatibility with old clients

spec :: Event -> EventInfo Source #

Deprecated: The field is now called evSpec

time :: Event -> Timestamp Source #

Deprecated: The field is now called evTime