diff options
Diffstat (limited to 'rts/eventlog/EventLog.c')
-rw-r--r-- | rts/eventlog/EventLog.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index a9bb603523..8683ad9972 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -114,7 +114,8 @@ char *EventDesc[] = { [EVENT_CONC_SYNC_END] = "End concurrent GC synchronisation", [EVENT_CONC_SWEEP_BEGIN] = "Begin concurrent sweep", [EVENT_CONC_SWEEP_END] = "End concurrent sweep", - [EVENT_CONC_UPD_REM_SET_FLUSH] = "Update remembered set flushed" + [EVENT_CONC_UPD_REM_SET_FLUSH] = "Update remembered set flushed", + [EVENT_NONMOVING_HEAP_CENSUS] = "Nonmoving heap census" }; // Event type. @@ -470,6 +471,10 @@ init_event_types(void) sizeof(EventCapNo); break; + case EVENT_NONMOVING_HEAP_CENSUS: // (cap, blk_size, active_segs, filled_segs, live_blks) + eventTypes[t].size = 13; + break; + default: continue; /* ignore deprecated events */ } @@ -1182,6 +1187,18 @@ void postConcMarkEnd(StgWord32 marked_obj_count) RELEASE_LOCK(&eventBufMutex); } +void postNonmovingHeapCensus(int log_blk_size, + const struct NonmovingAllocCensus *census) +{ + ACQUIRE_LOCK(&eventBufMutex); + postEventHeader(&eventBuf, EVENT_NONMOVING_HEAP_CENSUS); + postWord8(&eventBuf, log_blk_size); + postWord32(&eventBuf, census->n_active_segs); + postWord32(&eventBuf, census->n_filled_segs); + postWord32(&eventBuf, census->n_live_blocks); + RELEASE_LOCK(&eventBufMutex); +} + void closeBlockMarker (EventsBuf *ebuf) { if (ebuf->marker) |