Safe Haskell | None |
---|---|
Language | Haskell98 |
- data EventLog = EventLog {}
- newtype Header = Header {
- eventTypes :: [EventType]
- data Data = Data {}
- data EventType = EventType {}
- data Event = Event {}
- data EventInfo
- = EventBlock { }
- | UnknownEvent {
- ref :: !EventTypeNum
- | Startup { }
- | Shutdown {
- | CreateThread { }
- | RunThread { }
- | StopThread {
- thread :: !ThreadId
- status :: !ThreadStopStatus
- | ThreadRunnable { }
- | MigrateThread { }
- | WakeupThread { }
- | ThreadLabel {
- thread :: !ThreadId
- threadlabel :: String
- | CreateSparkThread {
- sparkThread :: !ThreadId
- | SparkCounters { }
- | SparkCreate {
- | SparkDud {
- | SparkOverflow {
- | SparkRun {
- | SparkSteal { }
- | SparkFizzle {
- | SparkGC {
- | TaskCreate { }
- | TaskMigrate { }
- | TaskDelete { }
- | RequestSeqGC {
- | RequestParGC {
- | StartGC {
- | GCWork {
- | GCIdle {
- | GCDone {
- | EndGC {
- | GlobalSyncGC {
- | GCStatsGHC {
- heapCapset :: !Capset
- gen :: !Int
- copied :: !Word64
- slop, frag :: !Word64
- parNThreads :: !Int
- parMaxCopied :: !Word64
- parTotCopied :: !Word64
- | HeapAllocated {
- heapCapset :: !Capset
- allocBytes :: !Word64
- | HeapSize {
- heapCapset :: !Capset
- sizeBytes :: !Word64
- | HeapLive {
- heapCapset :: !Capset
- liveBytes :: !Word64
- | HeapInfoGHC {
- heapCapset :: !Capset
- gens :: !Int
- maxHeapSize :: !Word64
- allocAreaSize :: !Word64
- mblockSize :: !Word64
- blockSize :: !Word64
- | CapCreate { }
- | CapDelete { }
- | CapDisable { }
- | CapEnable { }
- | CapsetCreate {
- capset :: !Capset
- capsetType :: CapsetType
- | CapsetDelete { }
- | CapsetAssignCap { }
- | CapsetRemoveCap { }
- | RtsIdentifier { }
- | ProgramArgs { }
- | ProgramEnv { }
- | OsProcessPid { }
- | OsProcessParentPid { }
- | WallClockTime { }
- | Message { }
- | UserMessage { }
- | UserMarker {
- markername :: String
- | Version { }
- | ProgramInvocation { }
- | CreateMachine { }
- | KillMachine { }
- | CreateProcess { }
- | KillProcess { }
- | AssignThreadToProcess { }
- | EdenStartReceive {
- | EdenEndReceive {
- | SendMessage { }
- | ReceiveMessage { }
- | SendReceiveLocalMessage { }
- | InternString { }
- | MerStartParConjunction { }
- | MerEndParConjunction {
- dyn_id :: !ParConjDynId
- | MerEndParConjunct {
- dyn_id :: !ParConjDynId
- | MerCreateSpark {
- dyn_id :: !ParConjDynId
- spark_id :: !SparkId
- | MerFutureCreate { }
- | MerFutureWaitNosuspend { }
- | MerFutureWaitSuspended { }
- | MerFutureSignal { }
- | MerLookingForGlobalThread
- | MerWorkStealing
- | MerLookingForLocalSpark
- | MerReleaseThread { }
- | MerCapSleeping
- | MerCallingMain
- | PerfName {
- perfNum :: !PerfEventTypeNum
- name :: String
- | PerfCounter {
- perfNum :: !PerfEventTypeNum
- tid :: !KernelThreadId
- period :: !Word64
- | PerfTracepoint {
- perfNum :: !PerfEventTypeNum
- tid :: !KernelThreadId
- | HeapProfBegin {
- heapProfId :: !Word8
- heapProfSamplingPeriod :: !Word64
- heapProfBreakdown :: !HeapProfBreakdown
- heapProfModuleFilter :: !Text
- heapProfClosureDescrFilter :: !Text
- heapProfTypeDescrFilter :: !Text
- heapProfCostCentreFilter :: !Text
- heapProfCostCentreStackFilter :: !Text
- heapProfRetainerFilter :: !Text
- heapProfBiographyFilter :: !Text
- | HeapProfCostCentre { }
- | HeapProfSampleBegin { }
- | HeapProfSampleCostCentre {
- heapProfId :: !Word8
- heapProfResidency :: !Word64
- heapProfStackDepth :: !Word8
- heapProfStack :: !(Vector Word32)
- | HeapProfSampleString {
- heapProfId :: !Word8
- heapProfResidency :: !Word64
- heapProfLabel :: !Text
- data ThreadStopStatus
- = NoStatus
- | HeapOverflow
- | StackOverflow
- | ThreadYielding
- | ThreadBlocked
- | ThreadFinished
- | ForeignCall
- | BlockedOnMVar
- | BlockedOnMVarRead
- | BlockedOnBlackHole
- | BlockedOnRead
- | BlockedOnWrite
- | BlockedOnDelay
- | BlockedOnSTM
- | BlockedOnDoProc
- | BlockedOnCCall
- | BlockedOnCCall_NoUnblockExc
- | BlockedOnMsgThrowTo
- | ThreadMigrating
- | BlockedOnMsgGlobalise
- | BlockedOnBlackHoleOwnedBy !ThreadId
- data CapsetType
- data HeapProfBreakdown
- newtype HeapProfFlags = HeapProfFlags Word8
- type Timestamp = Word64
- type ThreadId = Word32
- type TaskId = Word64
- newtype KernelThreadId = KernelThreadId {}
- type EventTypeNum = Word16
- type EventTypeDesc = String
- type EventTypeSize = Word16
- type BlockSize = Word32
- type Capset = Word32
- type PID = Word32
- type StringId = Word32
- type ProcessId = Word32
- type MachineId = Word16
- type PortId = ThreadId
- type MessageSize = Word32
- data MessageTag
- type ParConjDynId = Word64
- type ParConjStaticId = StringId
- type SparkId = Word32
- type FutureId = Word64
- type PerfEventTypeNum = Word32
- readEventLogFromFile :: FilePath -> IO (Either String EventLog)
- writeEventLogToFile :: FilePath -> EventLog -> IO ()
- serialiseEventLog :: EventLog -> ByteString
- data CapEvent = CapEvent {}
- sortEvents :: [Event] -> [Event]
- buildEventTypeMap :: [EventType] -> IntMap EventType
- printEventsIncremental :: Bool -> FilePath -> IO ()
- showEventInfo :: EventInfo -> String
- buildEventInfo :: EventInfo -> Builder
- showThreadStopStatus :: ThreadStopStatus -> String
- ppEventLog :: EventLog -> String
- ppEventType :: EventType -> String
- ppEvent :: IntMap EventType -> Event -> String
- buildEvent :: IntMap EventType -> Event -> Builder
- buildEvent' :: Event -> Builder
- nEVENT_PERF_NAME :: EventTypeNum
- nEVENT_PERF_COUNTER :: EventTypeNum
- nEVENT_PERF_TRACEPOINT :: EventTypeNum
- sz_perf_num :: EventTypeSize
- sz_kernel_tid :: EventTypeSize
- spec :: Event -> EventInfo
- time :: Event -> Timestamp
The event log types
EventType | |
|
data ThreadStopStatus Source #
data CapsetType Source #
data HeapProfBreakdown Source #
Sample break-down types in heap profiling
newtype HeapProfFlags Source #
newtype KernelThreadId Source #
type EventTypeNum = Word16 Source #
type EventTypeDesc = String Source #
type EventTypeSize = Word16 Source #
type MessageSize = Word32 Source #
data MessageTag Source #
type ParConjDynId = Word64 Source #
type ParConjStaticId = StringId Source #
type PerfEventTypeNum = Word32 Source #
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
Deprecated: CapEvents will be removed soon, now Event has a field evCap
An event annotated with the Capability that generated it, if any
CapEvent | Deprecated: CapEvents will be removed soon, now Event has a field evCap |
sortEvents :: [Event] -> [Event] Source #
Printing
printEventsIncremental Source #
Read an eventlog file and pretty print it to stdout
showEventInfo :: EventInfo -> String Source #
buildEventInfo :: EventInfo -> Builder Source #
ppEventLog :: EventLog -> String Source #
ppEventType :: EventType -> String Source #
ppEvent :: IntMap EventType -> Event -> String Source #
Pretty prints an Event
, with clean handling for UnknownEvent
buildEvent' :: Event -> Builder Source #