summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmTicky.hs
diff options
context:
space:
mode:
authorJohan Tibell <johan.tibell@gmail.com>2014-03-11 13:54:29 +0100
committerJohan Tibell <johan.tibell@gmail.com>2014-03-11 20:01:54 +0100
commitc1d74ab96df7607529596d01223bc8654abf71b9 (patch)
treef1442ce5bc9dfc0b3e9e92f2d5788292ce9b9d5a /compiler/codeGen/StgCmmTicky.hs
parentb684f27ec7b3538ffd9401de70ef5685b8b71978 (diff)
downloadhaskell-c1d74ab96df7607529596d01223bc8654abf71b9.tar.gz
Fix incorrect loop condition in inline array allocation
Also make sure allocHeapClosure updates profiling counters with the memory allocated.
Diffstat (limited to 'compiler/codeGen/StgCmmTicky.hs')
-rw-r--r--compiler/codeGen/StgCmmTicky.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmTicky.hs b/compiler/codeGen/StgCmmTicky.hs
index 50112f1ef8..b1218201a6 100644
--- a/compiler/codeGen/StgCmmTicky.hs
+++ b/compiler/codeGen/StgCmmTicky.hs
@@ -485,7 +485,9 @@ tickyAllocHeap genuine hp
-- the units are bytes
-tickyAllocPrim :: CmmExpr -> CmmExpr -> CmmExpr -> FCode ()
+tickyAllocPrim :: CmmExpr -- ^ size of the full header, in bytes
+ -> CmmExpr -- ^ size of the payload, in bytes
+ -> CmmExpr -> FCode ()
tickyAllocPrim _hdr _goods _slop = ifTicky $ do
bumpTickyCounter (fsLit "ALLOC_PRIM_ctr")
bumpTickyCounterByE (fsLit "ALLOC_PRIM_adm") _hdr