summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2015-11-07 09:39:05 +0000
committerSimon Marlow <marlowsd@gmail.com>2015-11-07 09:39:05 +0000
commitce1f1607ed7f8fedd2f63c8610cafefd59baaf32 (patch)
tree718641160c3d93a2ca974deec1e228cb09e1a97e /includes
parenta58eeb7febd67c93dab82de7049ef1dcdecd34e9 (diff)
downloadhaskell-ce1f1607ed7f8fedd2f63c8610cafefd59baaf32.tar.gz
Make GHCi & TH work when the compiler is built with -prof
Summary: Amazingly, there were zero changes to the byte code generator and very few changes to the interpreter - mainly because we've used good abstractions that hide the differences between profiling and non-profiling. So that bit was pleasantly straightforward, but there were a pile of other wibbles to get the whole test suite through. Note that a compiler built with -prof is now like one built with -dynamic, in that to use TH you have to build the code the same way. For dynamic, we automatically enable -dynamic-too when TH is required, but we don't have anything equivalent for profiling, so you have to explicitly use -prof when building code that uses TH with a profiled compiler. For this reason Cabal won't work with TH. We don't expect to ship a profiled compiler, so I think that's OK. Test Plan: validate with GhcProfiled=YES in validate.mk Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang Reviewed By: ezyang Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1407 GHC Trac Issues: #4837, #545
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/prof/CCS.h2
-rw-r--r--includes/rts/storage/InfoTables.h28
2 files changed, 2 insertions, 28 deletions
diff --git a/includes/rts/prof/CCS.h b/includes/rts/prof/CCS.h
index 74f18b85c0..607931d536 100644
--- a/includes/rts/prof/CCS.h
+++ b/includes/rts/prof/CCS.h
@@ -244,10 +244,12 @@ extern CostCentreStack * RTS_VAR(CCS_LIST); // registered CCS list
/* eliminate profiling overhead from allocation costs */
#define CCS_ALLOC(ccs, size) (ccs)->mem_alloc += ((size)-sizeofW(StgProfHeader))
+#define ENTER_CCS_THUNK(cap,p) cap->r.rCCCS = p->header.prof.ccs
#else /* !PROFILING */
#define CCS_ALLOC(ccs, amount) doNothing()
+#define ENTER_CCS_THUNK(cap,p) doNothing()
#endif /* PROFILING */
diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
index 3890d49a8e..228369b22f 100644
--- a/includes/rts/storage/InfoTables.h
+++ b/includes/rts/storage/InfoTables.h
@@ -49,28 +49,6 @@ typedef struct {
} StgProfInfo;
/* -----------------------------------------------------------------------------
- Ticky info
-
- There is no ticky-specific stuff in an info table at this time.
- -------------------------------------------------------------------------- */
-
-/* -----------------------------------------------------------------------------
- Debugging info
- -------------------------------------------------------------------------- */
-
-#ifdef DEBUG_CLOSURE
-
-typedef struct {
- ... whatever ...
-} StgDebugInfo;
-
-#else /* !DEBUG_CLOSURE */
-
-/* There is no DEBUG-specific stuff in an info table at this time. */
-
-#endif /* DEBUG_CLOSURE */
-
-/* -----------------------------------------------------------------------------
Closure flags
-------------------------------------------------------------------------- */
@@ -216,12 +194,6 @@ typedef struct StgInfoTable_ {
#ifdef PROFILING
StgProfInfo prof;
#endif
-#ifdef TICKY
- /* Ticky-specific stuff would go here. */
-#endif
-#ifdef DEBUG_CLOSURE
- /* Debug-specific stuff would go here. */
-#endif
StgClosureInfo layout; /* closure layout info (one word) */