[commit: ghc] master: rts: drop unused calcLiveBlocks, calcLiveWords (7362809)

git at git.haskell.org git at git.haskell.org
Sun Feb 7 20:28:12 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7362809b4e934d7d2024cf72ffddab7de0eab24b/ghc

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

commit 7362809b4e934d7d2024cf72ffddab7de0eab24b
Author: Sergei Trofimovich <siarheit at google.com>
Date:   Sun Feb 7 15:55:44 2016 +0000

    rts: drop unused calcLiveBlocks, calcLiveWords
    
    Use of these helper functions was removed by
      commit 18896fa2b06844407fd1e0d3f85cd3db97a96ff4
      Author: Simon Marlow <marlowsd at gmail.com>
      Date:   Wed Feb 2 15:49:55 2011 +0000
    
    Noticed by uselex.rb:
        calcLiveBlocks: [R]: exported from:
            ./rts/dist/build/sm/Storage.o
        calcLiveWords: [R]: exported from:
            ./rts/dist/build/sm/Storage.o
    
    Signed-off-by: Sergei Trofimovich <siarheit at google.com>


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

7362809b4e934d7d2024cf72ffddab7de0eab24b
 rts/sm/Storage.c | 26 --------------------------
 rts/sm/Storage.h |  3 ---
 2 files changed, 29 deletions(-)

diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 65f5b70..c815b99 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1204,32 +1204,6 @@ W_ gcThreadLiveBlocks (nat i, nat g)
     return blocks;
 }
 
-// Return an accurate count of the live data in the heap, excluding
-// generation 0.
-W_ calcLiveWords (void)
-{
-    nat g;
-    W_ live;
-
-    live = 0;
-    for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
-        live += genLiveWords(&generations[g]);
-    }
-    return live;
-}
-
-W_ calcLiveBlocks (void)
-{
-    nat g;
-    W_ live;
-
-    live = 0;
-    for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
-        live += genLiveBlocks(&generations[g]);
-    }
-    return live;
-}
-
 /* Determine which generation will be collected next, and approximate
  * the maximum amount of memory that will be required to do the GC,
  * taking into account data that will be copied, and the space needed
diff --git a/rts/sm/Storage.h b/rts/sm/Storage.h
index d0094b6..3dd3ec0 100644
--- a/rts/sm/Storage.h
+++ b/rts/sm/Storage.h
@@ -124,9 +124,6 @@ W_    gcThreadLiveBlocks (nat i, nat g);
 W_    genLiveWords  (generation *gen);
 W_    genLiveBlocks (generation *gen);
 
-W_    calcLiveBlocks (void);
-W_    calcLiveWords  (void);
-
 /* ----------------------------------------------------------------------------
    Storage manager internal APIs and globals
    ------------------------------------------------------------------------- */



More information about the ghc-commits mailing list