summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMateusz Lenik <mlen@mlen.pl>2016-05-17 08:33:54 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-18 20:14:31 +0200
commitf0f0ac859257a0b528815adb61d3f024c8bafa16 (patch)
treef418e1de12d7046d7f9d6ce815a8cb8865786b40 /includes
parentfffe3a25adab41d44943ed1be0191cf570d3e154 (diff)
downloadhaskell-f0f0ac859257a0b528815adb61d3f024c8bafa16.tar.gz
Fix histograms for ticky code
This patch fixes Cmm generation required to produce histograms when compiling with -ticky flag, strips dead code from rts/Ticky.c and reworks it to use a shared constant in both C and Haskell code. Fixes #8308. Test Plan: T8308 Reviewers: jstolarek, simonpj, austin Reviewed By: simonpj Subscribers: mpickering, simonpj, bgamari, mlen, thomie, jstolarek Differential Revision: https://phabricator.haskell.org/D931 GHC Trac Issues: #8308
Diffstat (limited to 'includes')
-rw-r--r--includes/stg/Ticky.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/includes/stg/Ticky.h b/includes/stg/Ticky.h
index 08517c5f3c..5143c2fd5c 100644
--- a/includes/stg/Ticky.h
+++ b/includes/stg/Ticky.h
@@ -11,7 +11,6 @@
*
* -------------------------------------------------------------------------- */
-
#ifndef TICKYCOUNTERS_H
#define TICKYCOUNTERS_H
@@ -180,9 +179,17 @@ EXTERN StgInt RET_OLD_ctr INIT(0);
EXTERN StgInt RET_UNBOXED_TUP_ctr INIT(0);
EXTERN StgInt RET_SEMI_loads_avoided INIT(0);
-
/* End of counter declarations. */
+/* How many bins in ticky's histograms */
+#define TICKY_BIN_COUNT 9
+
+/* Histogram declarations */
+EXTERN StgInt RET_NEW_hst[TICKY_BIN_COUNT] INIT({0});
+EXTERN StgInt RET_OLD_hst[TICKY_BIN_COUNT] INIT({0});
+EXTERN StgInt RET_UNBOXED_TUP_hst[TICKY_BIN_COUNT] INIT({0});
+/* End of histogram declarations */
+
/* This is ugly, but the story is:
We got rid of StgTicky.h, which was previously
defining these macros for the benefit of C code