diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-06-16 15:03:01 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-07-16 20:31:47 +0200 |
commit | a9bc54766ddd1bdb011f1656ad58fb409055d08f (patch) | |
tree | 4d91f1a2c4c0b44b61c910a11b998bc71154f71a /includes | |
parent | b35e01c6c39d9f2d58009722e24d89049aa94287 (diff) | |
download | haskell-a9bc54766ddd1bdb011f1656ad58fb409055d08f.tar.gz |
Log heap profiler samples to event log
Test Plan: Try it
Reviewers: hvr, simonmar, austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1722
GHC Trac Issues: #11094
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/Config.h | 8 | ||||
-rw-r--r-- | includes/rts/EventLogFormat.h | 11 |
2 files changed, 14 insertions, 5 deletions
diff --git a/includes/rts/Config.h b/includes/rts/Config.h index 043bf2deb4..51ee74fdb8 100644 --- a/includes/rts/Config.h +++ b/includes/rts/Config.h @@ -27,12 +27,16 @@ #define USING_LIBBFD 1 #endif -/* DEBUG implies TRACING and TICKY_TICKY - */ +/* DEBUG implies TRACING and TICKY_TICKY */ #if defined(DEBUG) +#if !defined(TRACING) #define TRACING +#endif +#if !defined(TICKY_TICKY) #define TICKY_TICKY #endif +#endif + /* ----------------------------------------------------------------------------- Signals - supported on non-PAR versions of the runtime. See RtsSignals.h. diff --git a/includes/rts/EventLogFormat.h b/includes/rts/EventLogFormat.h index 68d0d08f55..d6838abd8a 100644 --- a/includes/rts/EventLogFormat.h +++ b/includes/rts/EventLogFormat.h @@ -163,8 +163,6 @@ #define EVENT_USER_MARKER 58 /* (marker_name) */ #define EVENT_HACK_BUG_T9003 59 /* Hack: see trac #9003 */ -/* Range 59 - 59 is available for new GHC and common events. */ - /* Range 60 - 80 is used by eden for parallel tracing * see http://www.mathematik.uni-marburg.de/~eden/ */ @@ -173,12 +171,19 @@ /* Range 140 - 159 is reserved for Perf events. */ +/* Range 160 - 180 is reserved for cost-centre heap profiling events. */ + +#define EVENT_HEAP_PROF_BEGIN 160 +#define EVENT_HEAP_PROF_COST_CENTRE 161 +#define EVENT_HEAP_PROF_SAMPLE_BEGIN 162 +#define EVENT_HEAP_PROF_SAMPLE_COST_CENTRE 163 +#define EVENT_HEAP_PROF_SAMPLE_STRING 164 /* * 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 60 +#define NUM_GHC_EVENT_TAGS 165 #if 0 /* DEPRECATED EVENTS: */ /* we don't actually need to record the thread, it's implicit */ |