diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-03-31 11:03:44 +0300 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-03-31 11:03:59 +0300 |
commit | afb686a88901d7d0c93627806d7e4d0444aa17e8 (patch) | |
tree | 2dc421bb483902d29cc7d539d65c2c580b9e456c /rts | |
parent | c00b6d200c5c0c37c2936f12f27c5ebc3716a76f (diff) | |
download | haskell-afb686a88901d7d0c93627806d7e4d0444aa17e8.tar.gz |
printClosure: slightly improve MVAR printing
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D4541
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Printer.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/rts/Printer.c b/rts/Printer.c index 904f23acba..1c9634d8a9 100644 --- a/rts/Printer.c +++ b/rts/Printer.c @@ -331,7 +331,29 @@ printClosure( const StgClosure *obj ) case MVAR_DIRTY: { StgMVar* mv = (StgMVar*)obj; - debugBelch("MVAR(head=%p, tail=%p, value=%p)\n", mv->head, mv->tail, mv->value); + + debugBelch("MVAR(head="); + if ((StgClosure*)mv->head == &stg_END_TSO_QUEUE_closure) { + debugBelch("END_TSO_QUEUE"); + } else { + debugBelch("%p", mv->head); + } + + debugBelch(", tail="); + if ((StgClosure*)mv->tail == &stg_END_TSO_QUEUE_closure) { + debugBelch("END_TSO_QUEUE"); + } else { + debugBelch("%p", mv->tail); + } + + debugBelch(", value="); + if ((StgClosure*)mv->value == &stg_END_TSO_QUEUE_closure) { + debugBelch("END_TSO_QUEUE"); + } else { + debugBelch("%p", mv->value); + } + debugBelch(")\n"); + break; } @@ -358,7 +380,7 @@ printClosure( const StgClosure *obj ) case WEAK: debugBelch("WEAK("); - debugBelch(" key=%p value=%p finalizer=%p", + debugBelch("key=%p value=%p finalizer=%p", (StgPtr)(((StgWeak*)obj)->key), (StgPtr)(((StgWeak*)obj)->value), (StgPtr)(((StgWeak*)obj)->finalizer)); |