rts/Printer: add closure name entries for small arrays (Fixes #14513)
authorTakano Akio <tak@anoak.io>
Thu, 23 Nov 2017 17:17:24 +0000 (12:17 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 23 Nov 2017 17:19:06 +0000 (12:19 -0500)
Test Plan: ./validate

Reviewers: bgamari, erikd, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14513

Differential Revision: https://phabricator.haskell.org/D4226

includes/rts/storage/ClosureTypes.h
rts/Printer.c

index 240982c..443efed 100644 (file)
@@ -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 */
index f077814..904f23a 100644 (file)
@@ -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];