1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

Mps br/timing global.c: report dropped messages (currently in diagnostic varieties only)

Copied from Perforce
 Change: 166955
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Kistruck 2008-12-16 17:54:53 +00:00
parent 99b95ba8da
commit 33546a36cc

View file

@ -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);