From: Alex Rønne Petersen Date: Tue, 5 Apr 2016 22:42:54 +0000 (+0200) Subject: [mprof-report] Don't print a thread with a zero thread ID in the summary. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=f92d9d06745ff1ebadf55e6279add657744bef21;p=mono.git [mprof-report] Don't print a thread with a zero thread ID in the summary. Log buffers can end up with a zero thread ID when we synthesize events on the writer thread, leading to mprof-report thinking a thread exists with that ID. We simply ignore the "zero thread" in the thread summary. --- diff --git a/mono/profiler/decode.c b/mono/profiler/decode.c index c72ee0dfb86..10eaba51c6c 100644 --- a/mono/profiler/decode.c +++ b/mono/profiler/decode.c @@ -3150,7 +3150,9 @@ dump_threads (ProfContext *ctx) ThreadContext *thread; fprintf (outfile, "\nThread summary\n"); for (thread = ctx->threads; thread; thread = thread->next) { - fprintf (outfile, "\tThread: %p, name: \"%s\"\n", (void*)thread->thread_id, thread->name? thread->name: ""); + if (thread->thread_id) { + fprintf (outfile, "\tThread: %p, name: \"%s\"\n", (void*)thread->thread_id, thread->name? thread->name: ""); + } } }