Commit 5e356276 authored by takano-akio's avatar takano-akio Committed by Ben Gamari
Browse files

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
parent ad57e289
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
* If you add or delete any closure types, don't forget to update the following, * If you add or delete any closure types, don't forget to update the following,
* - the closure flags table in rts/ClosureFlags.c * - the closure flags table in rts/ClosureFlags.c
* - isRetainer in rts/RetainerProfile.c * - isRetainer in rts/RetainerProfile.c
* - the closure_type_names list in rts/Printer.c
*/ */
/* Object tag 0 raises an internal error */ /* Object tag 0 raises an internal error */
......
...@@ -820,7 +820,8 @@ void printObj( StgClosure *obj ) ...@@ -820,7 +820,8 @@ void printObj( StgClosure *obj )
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Closure types 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[] = { const char *closure_type_names[] = {
...@@ -883,9 +884,17 @@ const char *closure_type_names[] = { ...@@ -883,9 +884,17 @@ const char *closure_type_names[] = {
[CATCH_RETRY_FRAME] = "CATCH_RETRY_FRAME", [CATCH_RETRY_FRAME] = "CATCH_RETRY_FRAME",
[CATCH_STM_FRAME] = "CATCH_STM_FRAME", [CATCH_STM_FRAME] = "CATCH_STM_FRAME",
[WHITEHOLE] = "WHITEHOLE", [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" [COMPACT_NFDATA] = "COMPACT_NFDATA"
}; };
#if N_CLOSURE_TYPES != 64
#error Closure types changed: update Printer.c!
#endif
const char * const char *
info_type(const StgClosure *closure){ info_type(const StgClosure *closure){
return closure_type_names[get_itbl(closure)->type]; return closure_type_names[get_itbl(closure)->type];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment