summaryrefslogtreecommitdiff
path: root/rts/eventlog
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-11-25 17:03:08 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-02 01:14:59 -0500
commit75caafaafca5a1941c276f95017c34f68da8d679 (patch)
tree58113d937239965d60a3221c99a82b3739ebec58 /rts/eventlog
parent7aeb6d29313b23cd8d4da5d42cd9e740cca5c1df (diff)
downloadhaskell-75caafaafca5a1941c276f95017c34f68da8d679.tar.gz
Ticky profiling improvements.
This adds a number of changes to ticky-ticky profiling. When an executable is profiled with IPE profiling it's now possible to associate id-related ticky counters to their source location. This works by emitting the info table address as part of the counter which can be looked up in the IPE table. Add a `-ticky-ap-thunk` flag. This flag prevents the use of some standard thunks which are precompiled into the RTS. This means reduced cache locality and increased code size. But it allows better attribution of execution cost to specific source locations instead of simple attributing it to the standard thunk. ticky-ticky now uses the `arg` field to emit additional information about counters in json format. When ticky-ticky is used in combination with the eventlog eventlog2html can be used to generate a html table from the eventlog similar to the old text output for ticky-ticky.
Diffstat (limited to 'rts/eventlog')
-rw-r--r--rts/eventlog/EventLog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index ca37b441c6..d67f9e7bb1 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -1355,7 +1355,7 @@ void postProfBegin(void)
#if defined(TICKY_TICKY)
static void postTickyCounterDef(EventsBuf *eb, StgEntCounter *p)
{
- StgWord len = 8 + 2 + strlen(p->arg_kinds)+1 + strlen(p->str)+1;
+ StgWord len = 8 + 2 + strlen(p->arg_kinds)+1 + strlen(p->str)+1 + 8;
ensureRoomForVariableEvent(eb, len);
postEventHeader(eb, EVENT_TICKY_COUNTER_DEF);
postPayloadSize(eb, len);
@@ -1364,6 +1364,7 @@ static void postTickyCounterDef(EventsBuf *eb, StgEntCounter *p)
postWord16(eb, (uint16_t) p->arity);
postString(eb, p->arg_kinds);
postString(eb, p->str);
+ postWord64(eb, (W_) (INFO_PTR_TO_STRUCT(p->info)));
}
void postTickyCounterDefs(StgEntCounter *counters)