summaryrefslogtreecommitdiff
path: root/rts/RtsAPI.c
diff options
context:
space:
mode:
authorTakano Akio <aljee@hyper.cx>2013-10-01 07:40:35 +0900
committerAustin Seipp <austin@well-typed.com>2013-11-02 15:58:07 -0500
commit773365f91ff141ad38e929844c901ecd5465a000 (patch)
tree1459c326ef0df529f45a9933bf46eefcd001f0ea /rts/RtsAPI.c
parenta4b1a43542b11d09dd3b603d82c5a0e99da67d74 (diff)
downloadhaskell-773365f91ff141ad38e929844c901ecd5465a000.tar.gz
rts_apply uses CCS_MAIN rather than CCS_SYSTEM (#7753)
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts/RtsAPI.c')
-rw-r--r--rts/RtsAPI.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rts/RtsAPI.c b/rts/RtsAPI.c
index 720b732323..baa9934276 100644
--- a/rts/RtsAPI.c
+++ b/rts/RtsAPI.c
@@ -198,7 +198,12 @@ rts_apply (Capability *cap, HaskellObj f, HaskellObj arg)
StgThunk *ap;
ap = (StgThunk *)allocate(cap,sizeofW(StgThunk) + 2);
- SET_HDR(ap, (StgInfoTable *)&stg_ap_2_upd_info, CCS_SYSTEM);
+#ifdef PROFILING
+ // Here we don't want to use CCS_SYSTEM, because it's a hidden cost centre,
+ // and evaluating Haskell code under a hidden cost centre leads to
+ // confusing profiling output. (#7753)
+#endif
+ SET_HDR(ap, (StgInfoTable *)&stg_ap_2_upd_info, CCS_MAIN);
ap->payload[0] = f;
ap->payload[1] = arg;
return (StgClosure *)ap;