From patchwork Fri Jun 24 03:48:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9196489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71F8B6075F for ; Fri, 24 Jun 2016 03:49:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 608F52847D for ; Fri, 24 Jun 2016 03:49:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5441B28485; Fri, 24 Jun 2016 03:49:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0AEF42847D for ; Fri, 24 Jun 2016 03:49:10 +0000 (UTC) Received: from localhost ([::1]:40556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGI7B-0007aC-3s for patchwork-qemu-devel@patchwork.kernel.org; Thu, 23 Jun 2016 23:49:09 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7H2JNM8+CtUvH+aG0rFT5bXDjXcNZA+uMzGnWFO/dwg=; b=VexW7nyJ2UhSyLd3vOkKsSPggUZ8KJUvSwK1+ysfKr3UYrfeCZpVJphsnIM10SQGcs xiHotXgKDxiAHQXO7+7d+6nMuJJK8jIoI8lZEoQ586NLHHVp8ABvxHvA43lNXz1veH+J /DqfeJ2znjBl1SI8Fvmm+UbNCuE4ugDXo3ugbeOl0Ynj6f47FW2VH0UG+Uhu6pj0L7p6 5rYMV6rIqPaIaRYNB8BUbBxyLw0yBs26junaC7LT1Rwija1cPuiBu7ZGqbq3qZ3tTnNC Z9NEJlAKVdH9zjlcuA664/ru3+eZ0jaDZ7Hyl7oXDGIKb4GHzjCWXc2/43p3pL9KVv5e 2xFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=7H2JNM8+CtUvH+aG0rFT5bXDjXcNZA+uMzGnWFO/dwg=; b=jcab81kkzqHXML2j4RcuyHgigQy1TzY4HuSYo9EhANRFm1xplQ8fgV7l7KftJEFaPa UwjAnKciQepz28RuzW2W3FI3UXfoQJYkqhm/r/tkSSbtu6sNI3Af6IWgpPyPEO5Y36iy nu+/KhltJTWGjGS93Nth3Iw9Rh9zVcSRCDnFYD7ZPRG4jNgHWHrizmI8IJwa6Gs74wzi uh1ME1M4DNPZG0bZsU0bkDveCO5QT9WSNEH4j2aPx4WYr/yr9ceMf+BF+BsUYnrZeQ0s ghZvX5u9rRslpRw/bnSXGxrsxj5YC30x76+Hh2Mx85dTxw9y0IfQDCE1wPYztbs4FvIT 9nxw== X-Gm-Message-State: ALyK8tKxJl0FiVCGifn0Q4MtKJZci/wV0vLvgemiaruVfXNHth1fqgRGYJO/sx6ttoeqrQ== X-Received: by 10.66.21.132 with SMTP id v4mr3671055pae.54.1466740115463; Thu, 23 Jun 2016 20:48:35 -0700 (PDT) Received: from pike.twiddle.net (71-37-54-227.tukw.qwest.net. [71.37.54.227]) by smtp.gmail.com with ESMTPSA id p129sm3309134pfb.73.2016.06.23.20.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jun 2016 20:48:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 23 Jun 2016 20:48:26 -0700 Message-Id: <1466740107-15042-9-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466740107-15042-1-git-send-email-rth@twiddle.net> References: <1466740107-15042-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::243 Subject: [Qemu-devel] [PATCH v3 8/9] tcg: Include liveness info in the dumps X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson Reviewed-by: Aurelien Jarno --- 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"); } }