diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 16:15:46 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 16:15:46 +0000 |
commit | 33d0f4992bb2340e4a7abb2c5eb92c2672d844dd (patch) | |
tree | f65fc89aa3d3601c2925ee1b4c862444bbb9c099 | |
parent | 2677e4287c3eaee4249e4b6fe31586f2f698c33d (diff) | |
parent | 984149bf8845dd897e038943b6177ae4fb184591 (diff) | |
download | haskell-33d0f4992bb2340e4a7abb2c5eb92c2672d844dd.tar.gz |
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc
-rw-r--r-- | docs/users_guide/profiling.xml | 4 | ||||
-rw-r--r-- | includes/Cmm.h | 16 | ||||
-rw-r--r-- | rts/RetainerProfile.c | 5 |
3 files changed, 13 insertions, 12 deletions
diff --git a/docs/users_guide/profiling.xml b/docs/users_guide/profiling.xml index 25db08045a..5589fa9f9c 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/includes/Cmm.h b/includes/Cmm.h index 211d2a86fe..5ef6c2d282 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -372,8 +372,8 @@ CCCS_ALLOC(bytes); #define HEAP_CHECK(bytes,failure) \ - Hp = Hp + bytes; \ - if (Hp > HpLim) { HpAlloc = bytes; failure; } \ + Hp = Hp + (bytes); \ + if (Hp > HpLim) { HpAlloc = (bytes); failure; } \ TICK_ALLOC_HEAP_NOCTR(bytes); #define ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,failure) \ @@ -400,8 +400,8 @@ #define HP_CHK_P(bytes, fun, arg) \ HEAP_CHECK(bytes, GC_PRIM_P(fun,arg)) -#define ALLOC_P_TICKY(alloc, fun, arg) \ - HP_CHK_P(alloc); \ +#define ALLOC_P_TICKY(alloc, fun, arg) \ + HP_CHK_P(alloc); \ TICK_ALLOC_HEAP_NOCTR(alloc); #define CHECK_GC() \ @@ -473,22 +473,22 @@ } #define STK_CHK(n, fun) \ - if (Sp - n < SpLim) { \ + if (Sp - (n) < SpLim) { \ GC_PRIM(fun) \ } #define STK_CHK_P(n, fun, arg) \ - if (Sp - n < SpLim) { \ + if (Sp - (n) < SpLim) { \ GC_PRIM_P(fun,arg) \ } #define STK_CHK_PP(n, fun, arg1, arg2) \ - if (Sp - n < SpLim) { \ + if (Sp - (n) < SpLim) { \ GC_PRIM_PP(fun,arg1,arg2) \ } #define STK_CHK_ENTER(n, closure) \ - if (Sp - n < SpLim) { \ + if (Sp - (n) < SpLim) { \ jump __stg_gc_enter_1(closure); \ } diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 5f9164b77b..24745eae1a 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; // |