Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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 :: !Text
- | 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 :: !Word64
- frag :: !Word64
- parNThreads :: !Int
- parMaxCopied :: !Word64
- parTotCopied :: !Word64
- parBalancedCopied :: !(Maybe Word64)
- | MemReturn { }
- | HeapAllocated {
- heapCapset :: !Capset
- allocBytes :: !Word64
- | HeapSize {
- heapCapset :: !Capset
- sizeBytes :: !Word64
- | BlocksSize {
- heapCapset :: !Capset
- blocksSize :: !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 :: !Text
- | 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 :: !Text
- | 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 { }
- | InfoTableProv { }
- | HeapProfSampleBegin { }
- | HeapProfSampleEnd { }
- | HeapBioProfSampleBegin { }
- | HeapProfSampleCostCentre {
- heapProfId :: !Word8
- heapProfResidency :: !Word64
- heapProfStackDepth :: !Word8
- heapProfStack :: !(Vector Word32)
- | HeapProfSampleString {
- heapProfId :: !Word8
- heapProfResidency :: !Word64
- heapProfLabel :: !Text
- | ProfSampleCostCentre {
- profCapset :: !Capset
- profTicks :: !Word64
- profStackDepth :: !Word8
- profCcsStack :: !(Vector Word32)
- | ProfBegin { }
- | UserBinaryMessage {
- payload :: !ByteString
- | ConcMarkBegin
- | ConcMarkEnd { }
- | ConcSyncBegin
- | ConcSyncEnd
- | ConcSweepBegin
- | ConcSweepEnd
- | ConcUpdRemSetFlush { }
- | NonmovingHeapCensus { }
- | TickyCounterDef {
- tickyCtrDefId :: !Word64
- tickyCtrDefArity :: !Word16
- tickyCtrDefKinds :: !Text
- tickyCtrDefName :: !Text
- | TickyCounterSample { }
- | TickyBeginSample
- 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 = Text
- 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
Header | |
|
EventType | |
|
Instances
data ThreadStopStatus Source #
Instances
Show ThreadStopStatus Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> ThreadStopStatus -> ShowS # show :: ThreadStopStatus -> String # showList :: [ThreadStopStatus] -> ShowS # |
data CapsetType Source #
Instances
Show CapsetType Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> CapsetType -> ShowS # show :: CapsetType -> String # showList :: [CapsetType] -> ShowS # |
data HeapProfBreakdown Source #
Sample break-down types in heap profiling
Instances
Show HeapProfBreakdown Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> HeapProfBreakdown -> ShowS # show :: HeapProfBreakdown -> String # showList :: [HeapProfBreakdown] -> ShowS # | |
Binary HeapProfBreakdown Source # | |
Defined in GHC.RTS.EventTypes put :: HeapProfBreakdown -> Put # get :: Get HeapProfBreakdown # putList :: [HeapProfBreakdown] -> Put # |
newtype HeapProfFlags Source #
Instances
Show HeapProfFlags Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> HeapProfFlags -> ShowS # show :: HeapProfFlags -> String # showList :: [HeapProfFlags] -> ShowS # | |
Binary HeapProfFlags Source # | |
Defined in GHC.RTS.EventTypes |
newtype KernelThreadId Source #
Instances
Eq KernelThreadId Source # | |
Defined in GHC.RTS.EventTypes (==) :: KernelThreadId -> KernelThreadId -> Bool # (/=) :: KernelThreadId -> KernelThreadId -> Bool # | |
Ord KernelThreadId Source # | |
Defined in GHC.RTS.EventTypes compare :: KernelThreadId -> KernelThreadId -> Ordering # (<) :: KernelThreadId -> KernelThreadId -> Bool # (<=) :: KernelThreadId -> KernelThreadId -> Bool # (>) :: KernelThreadId -> KernelThreadId -> Bool # (>=) :: KernelThreadId -> KernelThreadId -> Bool # max :: KernelThreadId -> KernelThreadId -> KernelThreadId # min :: KernelThreadId -> KernelThreadId -> KernelThreadId # | |
Show KernelThreadId Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> KernelThreadId -> ShowS # show :: KernelThreadId -> String # showList :: [KernelThreadId] -> ShowS # | |
Binary KernelThreadId Source # | |
Defined in GHC.RTS.EventTypes |
type EventTypeNum = Word16 Source #
type EventTypeDesc = Text Source #
type EventTypeSize = Word16 Source #
type MessageSize = Word32 Source #
data MessageTag Source #
Instances
Enum MessageTag Source # | |
Defined in GHC.RTS.EventTypes succ :: MessageTag -> MessageTag # pred :: MessageTag -> MessageTag # toEnum :: Int -> MessageTag # fromEnum :: MessageTag -> Int # enumFrom :: MessageTag -> [MessageTag] # enumFromThen :: MessageTag -> MessageTag -> [MessageTag] # enumFromTo :: MessageTag -> MessageTag -> [MessageTag] # enumFromThenTo :: MessageTag -> MessageTag -> MessageTag -> [MessageTag] # | |
Show MessageTag Source # | |
Defined in GHC.RTS.EventTypes showsPrec :: Int -> MessageTag -> ShowS # show :: MessageTag -> String # showList :: [MessageTag] -> ShowS # |
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 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
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 event log file and pretty print it to stdout
showEventInfo :: EventInfo -> String Source #
buildEventInfo :: EventInfo -> Builder Source #
ppEventLog :: EventLog -> String Source #
ppEventType :: EventType -> String Source #
Pretty prints an Event
, with clean handling for UnknownEvent
buildEvent' :: Event -> Builder Source #