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

Safe HaskellNone
LanguageHaskell98

GHC.RTS.Events

Contents

Synopsis

The event log types

data EventLog Source #

Constructors

EventLog 

Fields

Instances
Show EventLog Source # 
Instance details

Defined in GHC.RTS.EventTypes

newtype Header Source #

Constructors

Header 

Fields

Instances
Eq Header Source # 
Instance details

Defined in GHC.RTS.EventTypes

Methods

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

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

Show Header Source # 
Instance details

Defined in GHC.RTS.EventTypes

data Data Source #

Constructors

Data 

Fields

Instances
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
Eq EventType Source # 
Instance details

Defined in GHC.RTS.EventTypes

Show EventType Source # 
Instance details

Defined in GHC.RTS.EventTypes

data Event Source #

Constructors

Event 
Instances
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 
UnknownEvent 

Fields

Startup 

Fields

Shutdown 
CreateThread 

Fields

RunThread 

Fields

StopThread 
ThreadRunnable 

Fields

MigrateThread 

Fields

WakeupThread 

Fields

ThreadLabel 
CreateSparkThread 

Fields

SparkCounters 
SparkCreate 
SparkDud 
SparkOverflow 
SparkRun 
SparkSteal 

Fields

SparkFizzle 
SparkGC 
TaskCreate 

Fields

TaskMigrate 

Fields

TaskDelete 

Fields

RequestSeqGC 
RequestParGC 
StartGC 
GCWork 
GCIdle 
GCDone 
EndGC 
GlobalSyncGC 
GCStatsGHC 
HeapAllocated 
HeapSize 
HeapLive 
HeapInfoGHC 
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 
PerfCounter 
PerfTracepoint 
HeapProfBegin 
HeapProfCostCentre 
HeapProfSampleBegin 
HeapProfSampleEnd 
HeapBioProfSampleBegin 
HeapProfSampleCostCentre 
HeapProfSampleString 
Instances
Show EventInfo Source # 
Instance details

Defined in GHC.RTS.EventTypes

Reading and writing event logs

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

Read an entire eventlog file. It returns an error message if it encouters 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
Show CapEvent Source # 
Instance details

Defined in GHC.RTS.EventTypes

Printing

printEventsIncremental Source #

Arguments

:: Bool

Follow the file or not

-> FilePath 
-> IO () 

Read an eventlog file and pretty print it to stdout

ppEvent :: IntMap EventType -> Event -> String Source #

Pretty prints an Event, with clean handling for UnknownEvent

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