summaryrefslogtreecommitdiff
path: root/rts/RetainerSet.c
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-07-02 10:38:13 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-17 19:21:10 -0400
commitae4415b9487d24942aa0e91052d4b897a3cf2f2e (patch)
tree7114c5e3418cf480339f69313f8960adeb12e05a /rts/RetainerSet.c
parent7915afc6bb9539a4534db99aeb6616a6d145918a (diff)
downloadhaskell-ae4415b9487d24942aa0e91052d4b897a3cf2f2e.tar.gz
eventlog: Add biographical and retainer profiling traces
This patch adds a new eventlog event which indicates the start of a biographical profiler sample. These are different to normal events as they also include the timestamp of when the census took place. This is because the LDV profiler only emits samples at the end of the run. Now all the different profiling modes emit consumable events to the eventlog.
Diffstat (limited to 'rts/RetainerSet.c')
-rw-r--r--rts/RetainerSet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c
index 59103ddf61..634035b0d0 100644
--- a/rts/RetainerSet.c
+++ b/rts/RetainerSet.c
@@ -17,6 +17,7 @@
#include "RetainerSet.h"
#include "Arena.h"
#include "Profiling.h"
+#include "Trace.h"
#include <string.h>
@@ -230,7 +231,7 @@ printRetainer(FILE *f, retainer ccs)
* -------------------------------------------------------------------------- */
#if defined(SECOND_APPROACH)
void
-printRetainerSetShort(FILE *f, RetainerSet *rs, uint32_t max_length)
+printRetainerSetShort(FILE *f, RetainerSet *rs, W_ total_size, uint32_t max_length)
{
char tmp[max_length + 1];
uint32_t size;
@@ -262,6 +263,7 @@ printRetainerSetShort(FILE *f, RetainerSet *rs, uint32_t max_length)
}
}
fputs(tmp, f);
+ traceHeapProfSampleString(0, tmp, total_size);
}
#endif /* SECOND_APPROACH */