ghc-events 0.14.0 → 0.15.0
raw patch · 9 files changed
+73/−3 lines, 9 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ GHC.RTS.Events: TickyCounterDef :: !Word64 -> !Word16 -> !Text -> !Text -> EventInfo
+ GHC.RTS.Events: TickyCounterSample :: !Word64 -> !Word64 -> !Word64 -> !Word64 -> EventInfo
+ GHC.RTS.Events: [tickyCtrDefArity] :: EventInfo -> !Word16
+ GHC.RTS.Events: [tickyCtrDefId] :: EventInfo -> !Word64
+ GHC.RTS.Events: [tickyCtrDefKinds] :: EventInfo -> !Text
+ GHC.RTS.Events: [tickyCtrDefName] :: EventInfo -> !Text
+ GHC.RTS.Events: [tickyCtrSampleAllocd] :: EventInfo -> !Word64
+ GHC.RTS.Events: [tickyCtrSampleAllocs] :: EventInfo -> !Word64
+ GHC.RTS.Events: [tickyCtrSampleEntryCount] :: EventInfo -> !Word64
+ GHC.RTS.Events: [tickyCtrSampleId] :: EventInfo -> !Word64
Files
- CHANGELOG.md +4/−0
- README.md +2/−1
- ghc-events.cabal +1/−1
- include/EventLogFormat.h +4/−1
- src/GHC/RTS/EventTypes.hs +12/−0
- src/GHC/RTS/Events.hs +10/−0
- src/GHC/RTS/Events/Binary.hs +38/−0
- src/GHC/RTS/Events/Incremental.hs +1/−0
- test/Utils.hs +1/−0
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Change Log +## 0.15.0 - 2020-12-16++* Add support for ticky-ticky counts [#67](https://github.com/haskell/ghc-events/pull/67)+ ## 0.14.0 - 2020-11-17 * Add support for non-moving GC events [#60](https://github.com/haskell/ghc-events/pull/60)
README.md view
@@ -1,5 +1,6 @@ # ghc-events-[](https://travis-ci.org/haskell/ghc-events)++ [](https://hackage.haskell.org/package/ghc-events) [](http://packdeps.haskellers.com/feed?needle=ghc-events)
ghc-events.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: ghc-events-version: 0.14.0+version: 0.15.0 synopsis: Library and tool for parsing .eventlog files from GHC description: Parses .eventlog files emitted by GHC 6.12.1 and later. Includes the ghc-events tool permitting, in particular,
include/EventLogFormat.h view
@@ -211,12 +211,15 @@ #define EVENT_CONC_UPD_REM_SET_FLUSH 206 #define EVENT_NONMOVING_HEAP_CENSUS 207 +#define EVENT_TICKY_COUNTER_DEF 210+#define EVENT_TICKY_COUNTER_SAMPLE 211+ /* * The highest event code +1 that ghc itself emits. Note that some event * ranges higher than this are reserved but not currently emitted by ghc. * This must match the size of the EventDesc[] array in EventLog.c */-#define NUM_GHC_EVENT_TAGS 208+#define NUM_GHC_EVENT_TAGS 212 /* DEPRECATED EVENTS: */
src/GHC/RTS/EventTypes.hs view
@@ -447,6 +447,18 @@ , nonmovingCensusFilledSegs :: !Word32 , nonmovingCensusLiveBlocks :: !Word32 }+ | TickyCounterDef+ { tickyCtrDefId :: !Word64+ , tickyCtrDefArity :: !Word16+ , tickyCtrDefKinds :: !Text+ , tickyCtrDefName :: !Text+ }+ | TickyCounterSample+ { tickyCtrSampleId :: !Word64+ , tickyCtrSampleEntryCount :: !Word64+ , tickyCtrSampleAllocs :: !Word64+ , tickyCtrSampleAllocd :: !Word64+ } deriving Show {- [Note: Stop status in GHC-7.8.2]
src/GHC/RTS/Events.hs view
@@ -512,6 +512,16 @@ <> ": " <> TB.decimal nonmovingCensusActiveSegs <> " active segments" <> ", " <> TB.decimal nonmovingCensusFilledSegs <> " filled segments" <> ", " <> TB.decimal nonmovingCensusLiveBlocks <> " live blocks"+ TickyCounterDef {..} ->+ "ticky counter definition " <> TB.decimal tickyCtrDefId+ <> ", " <> "arity: " <> TB.decimal tickyCtrDefArity+ <> ", " <> "def kinds: " <> TB.fromText tickyCtrDefKinds+ <> ", " <> "name: " <> TB.fromText tickyCtrDefName+ TickyCounterSample {..} ->+ "ticky counter sample " <> TB.decimal tickyCtrSampleId+ <> ": " <> "entry count: " <> TB.decimal tickyCtrSampleEntryCount+ <> ", " <> TB.decimal tickyCtrSampleAllocs <> " allocs"+ <> ", " <> TB.decimal tickyCtrSampleAllocd <> " allocd" -- | Replace unprintable bytes in the message with the replacement character replaceUnprintableWith
src/GHC/RTS/Events/Binary.hs view
@@ -17,6 +17,7 @@ , post782StopParser , parRTSParsers , binaryEventParsers+ , tickyParsers -- * Writers , putEventLog@@ -881,6 +882,31 @@ return $! UserBinaryMessage { payload } ] +tickyParsers :: [EventParser EventInfo]+tickyParsers =+ [ VariableSizeParser EVENT_TICKY_COUNTER_DEF $ do+ payloadLen <- get :: Get Word16+ tickyCtrDefId <- get+ tickyCtrDefArity <- get+ tickyCtrDefKinds <- getTextNul+ tickyCtrDefName <- getTextNul+ assert+ (fromIntegral payloadLen == sum+ [ 8 -- tickyCtrDefId+ , 2 -- tickyCtrDefArity+ , textByteLen tickyCtrDefKinds+ , textByteLen tickyCtrDefName+ ])+ (return ())+ return $! TickyCounterDef{..}+ , FixedSizeParser EVENT_TICKY_COUNTER_SAMPLE (8*4) $ do+ tickyCtrSampleId <- get+ tickyCtrSampleEntryCount <- get+ tickyCtrSampleAllocs <- get+ tickyCtrSampleAllocd <- get+ return $! TickyCounterSample{..}+ ]+ -- | String byte length in the eventlog format. It includes -- 1 byte for NUL. textByteLen :: T.Text -> Int@@ -1032,6 +1058,8 @@ ConcSweepEnd {} -> EVENT_CONC_SWEEP_END ConcUpdRemSetFlush {} -> EVENT_CONC_UPD_REM_SET_FLUSH NonmovingHeapCensus {} -> EVENT_NONMOVING_HEAP_CENSUS+ TickyCounterDef {} -> EVENT_TICKY_COUNTER_DEF+ TickyCounterSample {} -> EVENT_TICKY_COUNTER_SAMPLE nEVENT_PERF_NAME, nEVENT_PERF_COUNTER, nEVENT_PERF_TRACEPOINT :: EventTypeNum nEVENT_PERF_NAME = EVENT_PERF_NAME@@ -1472,3 +1500,13 @@ putE nonmovingCensusActiveSegs putE nonmovingCensusFilledSegs putE nonmovingCensusLiveBlocks+putEventSpec TickyCounterDef {..} = do+ putE tickyCtrDefId+ putE tickyCtrDefArity+ putE (T.unpack tickyCtrDefKinds)+ putE (T.unpack tickyCtrDefName)+putEventSpec TickyCounterSample {..} = do+ putE tickyCtrSampleId+ putE tickyCtrSampleEntryCount+ putE tickyCtrSampleAllocs+ putE tickyCtrSampleAllocd
src/GHC/RTS/Events/Incremental.hs view
@@ -204,5 +204,6 @@ , heapProfParsers , timeProfParsers , binaryEventParsers+ , tickyParsers ] parsers = EventParsers $ mkEventTypeParsers imap event_parsers
test/Utils.hs view
@@ -20,6 +20,7 @@ , "time-prof.eventlog" , "trace-binary-event.eventlog" , "unicode.eventlog"+ , "ticky-ticky.eventlog" ]