diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-02-11 19:20:56 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-11 19:21:04 -0500 |
commit | 1a14d384136ce91d3469f462d192c3721b27fbd5 (patch) | |
tree | b4dbbb38925ae3cf0d5a75c0d44a150b66110ffa /rts/Profiling.h | |
parent | 26eaa7ecde288b9dc123f3c120e70b2cf18b4e4a (diff) | |
download | haskell-1a14d384136ce91d3469f462d192c3721b27fbd5.tar.gz |
rts/Profiling: Kill a few globals and add consts
Previously it was quite difficult to follow the dataflow through this
file due to global mutation and rather non-descriptive types.
This is a cleanup in preparation for factoring out the report-generating
logic, which is itself in preparation for somedayteaching the profiler
to produce more machine-readable reports (JSON perhaps?).
Test Plan: Validate
Reviewers: austin, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3096
Diffstat (limited to 'rts/Profiling.h')
-rw-r--r-- | rts/Profiling.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rts/Profiling.h b/rts/Profiling.h index 4158020596..6844a89188 100644 --- a/rts/Profiling.h +++ b/rts/Profiling.h @@ -32,7 +32,13 @@ extern FILE *hp_file; void reportCCSProfiling ( void ); -void PrintNewStackDecls ( void ); +/* A summary of an execution of a profiled program */ +typedef struct { + /* Total bytes allocated */ + uint64_t total_alloc; + /* Total number of profiler ticks */ + unsigned int total_prof_ticks; +} ProfilerTotals; void fprintCCS( FILE *f, CostCentreStack *ccs ); void fprintCCS_stderr (CostCentreStack *ccs, StgClosure *exception, StgTSO *tso); |