summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-10-10 14:50:41 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-11-02 16:34:03 +0000
commit649f3b0ca64619f3b77113ce3c94677ba70062b1 (patch)
treeda57ca8f76b5b75025ef7b37e54e3d4df2089ae4 /compiler/codeGen
parentd4c20a1b2c402d35b00b920c311f93b6396c6cf5 (diff)
downloadhaskell-649f3b0ca64619f3b77113ce3c94677ba70062b1.tar.gz
Don't generate stg_ap thunks when profiling, it loses information (#949)
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/CgExpr.lhs4
-rw-r--r--compiler/codeGen/StgCmmBind.hs5
2 files changed, 8 insertions, 1 deletions
diff --git a/compiler/codeGen/CgExpr.lhs b/compiler/codeGen/CgExpr.lhs
index fe08f50b42..1f16c1feee 100644
--- a/compiler/codeGen/CgExpr.lhs
+++ b/compiler/codeGen/CgExpr.lhs
@@ -42,6 +42,7 @@ import ListSetOps
import BasicTypes
import Util
import Outputable
+import StaticFlags
\end{code}
This module provides the support code for @StgToAbstractC@ to deal
@@ -382,6 +383,9 @@ mkRhsClosure bndr cc bi
&& all isFollowableArg (map idCgRep fvs)
&& isUpdatable upd_flag
&& arity <= mAX_SPEC_AP_SIZE
+ && not opt_SccProfilingOn -- not when profiling: we don't want to
+ -- lose information about this particular
+ -- thunk (e.g. its type) (#949)
-- Ha! an Ap thunk
= cgStdRhsClosure bndr cc bi fvs [] body lf_info payload
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 9f66684603..67dcd2d90f 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -247,8 +247,11 @@ mkRhsClosure bndr cc bi
&& all (isGcPtrRep . idPrimRep . stripNV) fvs
&& isUpdatable upd_flag
&& arity <= mAX_SPEC_AP_SIZE
+ && not opt_SccProfilingOn -- not when profiling: we don't want to
+ -- lose information about this particular
+ -- thunk (e.g. its type) (#949)
- -- Ha! an Ap thunk
+ -- Ha! an Ap thunk
= cgStdThunk bndr cc bi body lf_info payload
where
lf_info = mkApLFInfo bndr upd_flag arity