summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2016-02-07 17:55:56 +0000
committerSergei Trofimovich <siarheit@google.com>2016-02-07 20:27:37 +0000
commita49c9d4ef61f4394b63b9a66b804054f03231c76 (patch)
tree651cf32c79d3fcbbd1e9aa60caab65215e8bcfc4
parent7a488653715c991dc6f548828cfde47c2eac7845 (diff)
downloadhaskell-a49c9d4ef61f4394b63b9a66b804054f03231c76.tar.gz
rts: drop unused 'traverseAllRetainerSet'
While at is mark 'printRetainer' as 'static'. Noticed by uselex.rb: printRetainer: [R]: exported from: ./rts/dist/build/RetainerSet.p_o traverseAllRetainerSet: [R]: exported from: ./rts/dist/build/RetainerSet.p_o Signed-off-by: Sergei Trofimovich <siarheit@google.com>
-rw-r--r--docs/storage-mgt/rp.tex2
-rw-r--r--rts/RetainerSet.c22
-rw-r--r--rts/RetainerSet.h8
3 files changed, 3 insertions, 29 deletions
diff --git a/docs/storage-mgt/rp.tex b/docs/storage-mgt/rp.tex
index 0d841b9d42..c6de489c59 100644
--- a/docs/storage-mgt/rp.tex
+++ b/docs/storage-mgt/rp.tex
@@ -510,8 +510,6 @@ set is created. Otherwise, a new retainer set is created.
is created. Otherwise, a new retainer set is created.
\item[@rtsBool isMember(retainer r, retainerSet *rs)@] returns a boolean value
indicating whether @r@ is a member of @rs@.
-\item[@void traverseAllRetainerSet(void (*f)(retainerSet *))@] invokes the function
-@f@ on every retainer set created.
\item[@void printRetainerSetShort(FILE *, retainerSet *)@] prints a single retainer
set.
\item[@void outputRetainerSet(FILE *, nat *allCost, nat *numSet)@] prints all
diff --git a/rts/RetainerSet.c b/rts/RetainerSet.c
index 234532a879..4057e2e638 100644
--- a/rts/RetainerSet.c
+++ b/rts/RetainerSet.c
@@ -215,42 +215,26 @@ addElement(retainer r, RetainerSet *rs)
}
/* -----------------------------------------------------------------------------
- * Call f() for each retainer set.
- * -------------------------------------------------------------------------- */
-void
-traverseAllRetainerSet(void (*f)(RetainerSet *))
-{
- int i;
- RetainerSet *rs;
-
- (*f)(&rs_MANY);
- for (i = 0; i < HASH_TABLE_SIZE; i++)
- for (rs = hashTable[i]; rs != NULL; rs = rs->link)
- (*f)(rs);
-}
-
-
-/* -----------------------------------------------------------------------------
* printRetainer() prints the full information on a given retainer,
* not a retainer set.
* -------------------------------------------------------------------------- */
#if defined(RETAINER_SCHEME_INFO)
// Retainer scheme 1: retainer = info table
-void
+static void
printRetainer(FILE *f, retainer itbl)
{
fprintf(f, "%s[%s]", GET_PROF_DESC(itbl), itbl->prof.closure_type);
}
#elif defined(RETAINER_SCHEME_CCS)
// Retainer scheme 2: retainer = cost centre stack
-void
+static void
printRetainer(FILE *f, retainer ccs)
{
fprintCCS(f, ccs);
}
#elif defined(RETAINER_SCHEME_CC)
// Retainer scheme 3: retainer = cost centre
-void
+static void
printRetainer(FILE *f, retainer cc)
{
fprintf(f,"%s.%s", cc->module, cc->label);
diff --git a/rts/RetainerSet.h b/rts/RetainerSet.h
index 086629d4ab..ea9fabb7d7 100644
--- a/rts/RetainerSet.h
+++ b/rts/RetainerSet.h
@@ -160,9 +160,6 @@ isMember(retainer r, RetainerSet *rs)
// Finds or creates a retainer set augmented with a new retainer.
RetainerSet *addElement(retainer, RetainerSet *);
-// Call f() for each retainer set.
-void traverseAllRetainerSet(void (*f)(RetainerSet *));
-
#ifdef SECOND_APPROACH
// Prints a single retainer set.
void printRetainerSetShort(FILE *, RetainerSet *, nat);
@@ -194,11 +191,6 @@ void outputAllRetainerSet(FILE *);
#define hashKeySingleton(r) ((StgWord)(r))
#define hashKeyAddElement(r, s) (hashKeySingleton((r)) + (s)->hashKey)
-// Prints the full information on a given retainer.
-// Note: This function is not part of retainerSet interface, but this is
-// the best place to define it.
-void printRetainer(FILE *, retainer);
-
#include "EndPrivate.h"
#endif /* PROFILING */