summaryrefslogtreecommitdiff
path: root/rts/eventlog
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-21 21:22:01 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-17 05:48:01 -0500
commit66e281fba605dd650d7c2530ab8a482bb79538cb (patch)
tree56c7cb1a2420a0b890be50b648771afe8c184f0b /rts/eventlog
parent0ac5860ea4d45587771869970beecdd4da0cb105 (diff)
downloadhaskell-66e281fba605dd650d7c2530ab8a482bb79538cb.tar.gz
rts/eventlog: Introduce event to demarcate new ticky sample
Diffstat (limited to 'rts/eventlog')
-rw-r--r--rts/eventlog/EventLog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index afd5a8171f..6c7d1e836c 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -122,6 +122,7 @@ char *EventDesc[] = {
[EVENT_CONC_UPD_REM_SET_FLUSH] = "Update remembered set flushed",
[EVENT_NONMOVING_HEAP_CENSUS] = "Nonmoving heap census",
[EVENT_TICKY_COUNTER_DEF] = "Ticky-ticky entry counter definition",
+ [EVENT_TICKY_COUNTER_BEGIN_SAMPLE] = "Ticky-ticky entry counter begin sample",
[EVENT_TICKY_COUNTER_SAMPLE] = "Ticky-ticky entry counter sample",
};
@@ -494,6 +495,10 @@ init_event_types(void)
eventTypes[t].size = EVENT_SIZE_DYNAMIC;
break;
+ case EVENT_TICKY_COUNTER_BEGIN_SAMPLE:
+ eventTypes[t].size = 0;
+ break;
+
case EVENT_TICKY_COUNTER_SAMPLE: // (counter_id, entry_count, allocs, allocd)
eventTypes[t].size = 8*4;
break;
@@ -1524,6 +1529,8 @@ static void postTickyCounterSample(EventsBuf *eb, StgEntCounter *p)
void postTickyCounterSamples(StgEntCounter *counters)
{
ACQUIRE_LOCK(&eventBufMutex);
+ ensureRoomForEvent(&eventBuf, EVENT_TICKY_COUNTER_SAMPLE);
+ postEventHeader(&eventBuf, EVENT_TICKY_COUNTER_BEGIN_SAMPLE);
for (StgEntCounter *p = counters; p != NULL; p = p->link) {
postTickyCounterSample(&eventBuf, p);
}