[commit: ghc] master: rts/Printer: add closure name entries for small arrays (Fixes #14513) (5e35627)
git at git.haskell.org
git at git.haskell.org
Thu Nov 23 17:59:10 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5e356276efffa40e82c89628fbdf1a38ca489216/ghc
>---------------------------------------------------------------
commit 5e356276efffa40e82c89628fbdf1a38ca489216
Author: Takano Akio <tak at anoak.io>
Date: Thu Nov 23 12:17:24 2017 -0500
rts/Printer: add closure name entries for small arrays (Fixes #14513)
Test Plan: ./validate
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14513
Differential Revision: https://phabricator.haskell.org/D4226
>---------------------------------------------------------------
5e356276efffa40e82c89628fbdf1a38ca489216
includes/rts/storage/ClosureTypes.h | 1 +
rts/Printer.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/includes/rts/storage/ClosureTypes.h b/includes/rts/storage/ClosureTypes.h
index 240982c..443efed 100644
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -15,6 +15,7 @@
* If you add or delete any closure types, don't forget to update the following,
* - the closure flags table in rts/ClosureFlags.c
* - isRetainer in rts/RetainerProfile.c
+ * - the closure_type_names list in rts/Printer.c
*/
/* Object tag 0 raises an internal error */
diff --git a/rts/Printer.c b/rts/Printer.c
index f077814..904f23a 100644
--- a/rts/Printer.c
+++ b/rts/Printer.c
@@ -820,7 +820,8 @@ void printObj( StgClosure *obj )
/* -----------------------------------------------------------------------------
Closure types
- NOTE: must be kept in sync with the closure types in includes/ClosureTypes.h
+ NOTE: must be kept in sync with the closure types in
+ includes/rts/storage/ClosureTypes.h
-------------------------------------------------------------------------- */
const char *closure_type_names[] = {
@@ -883,9 +884,17 @@ const char *closure_type_names[] = {
[CATCH_RETRY_FRAME] = "CATCH_RETRY_FRAME",
[CATCH_STM_FRAME] = "CATCH_STM_FRAME",
[WHITEHOLE] = "WHITEHOLE",
+ [SMALL_MUT_ARR_PTRS_CLEAN] = "SMALL_MUT_ARR_PTRS_CLEAN",
+ [SMALL_MUT_ARR_PTRS_DIRTY] = "SMALL_MUT_ARR_PTRS_DIRTY",
+ [SMALL_MUT_ARR_PTRS_FROZEN0] = "SMALL_MUT_ARR_PTRS_FROZEN0",
+ [SMALL_MUT_ARR_PTRS_FROZEN] = "SMALL_MUT_ARR_PTRS_FROZEN",
[COMPACT_NFDATA] = "COMPACT_NFDATA"
};
+#if N_CLOSURE_TYPES != 64
+#error Closure types changed: update Printer.c!
+#endif
+
const char *
info_type(const StgClosure *closure){
return closure_type_names[get_itbl(closure)->type];
More information about the ghc-commits
mailing list