From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGI6g-0007ZE-QY for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGI6e-0001p1-Fo for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:37 -0400 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:34586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGI6e-0001oh-8L for qemu-devel@nongnu.org; Thu, 23 Jun 2016 23:48:36 -0400 Received: by mail-pa0-x243.google.com with SMTP id us13so7898391pab.1 for ; Thu, 23 Jun 2016 20:48:36 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 23 Jun 2016 20:48:26 -0700 Message-Id: <1466740107-15042-9-git-send-email-rth@twiddle.net> In-Reply-To: <1466740107-15042-1-git-send-email-rth@twiddle.net> References: <1466740107-15042-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, aurelien@aurel32.net, atar4qemu@gmail.com Signed-off-by: Richard Henderson --- tcg/tcg.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index fd92b06..3e4bc99 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1009,6 +1009,7 @@ void tcg_dump_ops(TCGContext *s) const TCGOpDef *def; const TCGArg *args; TCGOpcode c; + long pos = ftell(qemu_logfile); op = &s->gen_op_buf[oi]; c = op->opc; @@ -1133,6 +1134,31 @@ void tcg_dump_ops(TCGContext *s) qemu_log("%s$0x%" TCG_PRIlx, k ? "," : "", args[k]); } } + if (op->life) { + unsigned life = op->life; + + for (i = ftell(qemu_logfile) - pos; i < 48; ++i) { + putc(' ', qemu_logfile); + } + + if (life & (SYNC_ARG * 3)) { + qemu_log(" sync:"); + for (i = 0; i < 2; ++i) { + if (life & (SYNC_ARG << i)) { + qemu_log(" %d", i); + } + } + } + life /= DEAD_ARG; + if (life) { + qemu_log(" dead:"); + for (i = 0; life; ++i, life >>= 1) { + if (life & 1) { + qemu_log(" %d", i); + } + } + } + } qemu_log("\n"); } } -- 2.5.5