From 33546a36cced8088afb971dbae16bf8cf188d74c Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 16 Dec 2008 17:54:53 +0000 Subject: [PATCH] Mps br/timing global.c: report dropped messages (currently in diagnostic varieties only) Copied from Perforce Change: 166955 ServerID: perforce.ravenbrook.com --- mps/code/global.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mps/code/global.c b/mps/code/global.c index 7051225c12b..55bb5013a79 100644 --- a/mps/code/global.c +++ b/mps/code/global.c @@ -417,13 +417,21 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals) TraceIdMessagesDestroy(arena, ti); TRACE_SET_ITER_END(ti, trace, TraceSetUNIV, arena); + /* report dropped messages (currently in diagnostic varieties only) */ + if(arena->droppedMessages > 0) { + DIAG_SINGLEF(( "GlobalsPrepareToDestroy_dropped", + "arena->droppedMessages = $U", (WriteFU)arena->droppedMessages, + NULL )); + } + /* .message.queue.empty: Empty the queue of messages before */ /* proceeding to finish the arena. It is important that this */ /* is done before destroying the finalization pool as otherwise */ /* the message queue would have dangling pointers to messages */ /* whose memory has been unmapped. */ if(MessagePoll(arena)) { - DIAG_SINGLEF(( "GlobalsPrepareToDestroy", "Message queue not empty", NULL )); + DIAG_SINGLEF(( "GlobalsPrepareToDestroy_queue", + "Message queue not empty", NULL )); } MessageEmpty(arena);