diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-08-16 19:01:05 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-16 19:02:28 -0400 |
commit | a8da0de27e600211f04601ac737c329d6603c700 (patch) | |
tree | 26d759439b11dab3925d9c4723a5c76054f1dacc /includes | |
parent | 6e9c8eb9885f894eed7e01a074ee7d83b251b1b1 (diff) | |
download | haskell-a8da0de27e600211f04601ac737c329d6603c700.tar.gz |
Speed up compilation of profiling stubs
Here we encode the cost centre list as static data. This means that the
initialization stubs are small functions which should be easy for GCC to
compile, even with optimization.
Fixes #7960.
Test Plan: Test profiling
Reviewers: austin, erikd, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #7960
Differential Revision: https://phabricator.haskell.org/D3853
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Rts.h | 1 | ||||
-rw-r--r-- | includes/rts/Profiling.h | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index a59a8ca432..dd81033603 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -202,6 +202,7 @@ void _assertFail(const char *filename, unsigned int linenum) #include "rts/Utils.h" #include "rts/PrimFloat.h" #include "rts/Main.h" +#include "rts/Profiling.h" #include "rts/StaticPtrTable.h" #include "rts/Libdw.h" #include "rts/LibdwPool.h" diff --git a/includes/rts/Profiling.h b/includes/rts/Profiling.h new file mode 100644 index 0000000000..f1dafb78f5 --- /dev/null +++ b/includes/rts/Profiling.h @@ -0,0 +1,17 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 2017-2018 + * + * Cost-centre profiling API + * + * Do not #include this file directly: #include "Rts.h" instead. + * + * To understand the structure of the RTS headers, see the wiki: + * http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * + * -------------------------------------------------------------------------- */ + +#pragma once + +void registerCcList(CostCentre **cc_list); +void registerCcsList(CostCentreStack **cc_list); |