[commit: ghc] wip/T10613: Temporarily move regular entry counting to the COUNTING_IND (4ae80f3)

git at git.haskell.org git at git.haskell.org
Thu Apr 14 20:34:43 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T10613
Link       : http://ghc.haskell.org/trac/ghc/changeset/4ae80f362279c9cd4433ce621cb8740e3916dbee/ghc

>---------------------------------------------------------------

commit 4ae80f362279c9cd4433ce621cb8740e3916dbee
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Wed Mar 23 14:28:34 2016 +0100

    Temporarily move regular entry counting to the COUNTING_IND


>---------------------------------------------------------------

4ae80f362279c9cd4433ce621cb8740e3916dbee
 compiler/codeGen/StgCmmBind.hs | 8 ++++++--
 rts/StgMiscClosures.cmm        | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 5951175..8672273 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -609,9 +609,13 @@ thunkCode cl_info fv_details _cc node arity body
 
         -- Heap overflow check
         ; entryHeapCheck cl_info node' arity [] $ do
-        { -- Overwrite with black hole if necessary
+        {
+         -- Disabled for now, as we (temporarily unconditionally) move the
+         -- counting to the counting indirection
+         -- tickyEnterThunk cl_info
+
+          -- Overwrite with black hole if necessary
           -- but *after* the heap-overflow check
-        ; tickyEnterThunk cl_info
         ; when (blackHoleOnEntry cl_info && node_points)
                 (blackHoleIt node)
 
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index 96b95aa..0f27fdb 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -283,6 +283,7 @@ INFO_TABLE(stg_COUNTING_IND,1,2,COUNTING_IND,"COUNTING_IND","COUNTING_IND")
         StgEntCounter_multi_entry_count(ent_ctr)  = StgEntCounter_multi_entry_count(ent_ctr) + 1;
     }
     StgCountingInd_entries(clos) = entries + 1;
+    StgEntCounter_entry_count(ent_ctr) = StgEntCounter_entry_count(ent_ctr) + 1;
 
 #if defined(TICKY_TICKY) && !defined(PROFILING)
     /* TICKY_TICKY && !PROFILING means PERM_IND *replaces* an IND, rather than



More information about the ghc-commits mailing list