diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-02-11 19:21:22 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-11 19:58:34 -0500 |
commit | 56c9bb39246f9ffd8ed41a0656bfe8e60d23be57 (patch) | |
tree | 1887b6def9a39b52b99c9f10eb4416e4fe65fd14 /rts/Profiling.h | |
parent | 1a14d384136ce91d3469f462d192c3721b27fbd5 (diff) | |
download | haskell-56c9bb39246f9ffd8ed41a0656bfe8e60d23be57.tar.gz |
rts/Profiling: Factor out report generation
Here we move the actual report generation logic to
`rts/ProfilerReport.c`. This break is actually quite clean,
void writeCCSReport( FILE *prof_file, CostCentreStack const *ccs,
ProfilerTotals totals );
This is more profiler refactoring in preparation for machine-readable
output.
Test Plan: Validate
Reviewers: austin, erikd, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3097
Diffstat (limited to 'rts/Profiling.h')
-rw-r--r-- | rts/Profiling.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/rts/Profiling.h b/rts/Profiling.h index 6844a89188..24a4e24f0d 100644 --- a/rts/Profiling.h +++ b/rts/Profiling.h @@ -28,10 +28,6 @@ void freeProfiling (void); extern FILE *prof_file; extern FILE *hp_file; -#ifdef PROFILING - -void reportCCSProfiling ( void ); - /* A summary of an execution of a profiled program */ typedef struct { /* Total bytes allocated */ @@ -40,9 +36,16 @@ typedef struct { unsigned int total_prof_ticks; } ProfilerTotals; +#ifdef PROFILING + +void reportCCSProfiling ( void ); + void fprintCCS( FILE *f, CostCentreStack *ccs ); void fprintCCS_stderr (CostCentreStack *ccs, StgClosure *exception, StgTSO *tso); +bool ignoreCCS (CostCentreStack const *ccs); +bool ignoreCC (CostCentre const *cc); + #ifdef DEBUG void debugCCS( CostCentreStack *ccs ); #endif |