[commit: ghc] master: Retainer prof: immutable arrays are not retainers, and fix the docs (ab5008d)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ab5008d4498177dd375f942618ceab46ae37671a

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

commit ab5008d4498177dd375f942618ceab46ae37671a
Author: Simon Marlow <[email protected]>
Date:   Tue Oct 30 14:40:01 2012 +0000

    Retainer prof: immutable arrays are not retainers, and fix the docs

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

 docs/users_guide/profiling.xml |    4 ++--
 rts/RetainerProfile.c          |    5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml
index 25db080..5589fa9 100644
--- a/docs/users_guide/profiling.xml
+++ b/docs/users_guide/profiling.xml
@@ -884,8 +884,8 @@ MAIN            MAIN                    102           0    0.0    0.0   100.0  1
       by defining what we mean by a retainer:</para>
 
       <blockquote>
-	<para>A retainer is either the system stack, or an unevaluated
-	closure (thunk).</para>
+        <para>A retainer is either the system stack, an unevaluated
+        closure (thunk), or an explicitly mutable object.</para>
       </blockquote>
 
       <para>In particular, constructors are <emphasis>not</emphasis>
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 5f9164b..24745ea 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -1013,8 +1013,6 @@ isRetainer( StgClosure *c )
     case MUT_VAR_DIRTY:
     case MUT_ARR_PTRS_CLEAN:
     case MUT_ARR_PTRS_DIRTY:
-    case MUT_ARR_PTRS_FROZEN:
-    case MUT_ARR_PTRS_FROZEN0:
 
 	// thunks are retainers.
     case THUNK:
@@ -1071,6 +1069,9 @@ isRetainer( StgClosure *c )
     case ARR_WORDS:
 	// STM
     case TREC_CHUNK:
+        // immutable arrays
+    case MUT_ARR_PTRS_FROZEN:
+    case MUT_ARR_PTRS_FROZEN0:
 	return rtsFalse;
 
 	//
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.