From patchwork Thu Jun 1 17:34:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9760717 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 1343C60363 for ; Thu, 1 Jun 2017 17:36:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3ACF27F17 for ; Thu, 1 Jun 2017 17:36:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8C7A2851A; Thu, 1 Jun 2017 17:36:41 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9054F27F17 for ; Thu, 1 Jun 2017 17:36:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGTzU-0000EP-T3; Thu, 01 Jun 2017 17:34:32 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGTzT-0000DY-ID for xen-devel@lists.xenproject.org; Thu, 01 Jun 2017 17:34:31 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 31/DA-02180-62050395; Thu, 01 Jun 2017 17:34:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJIsWRWlGSWpSXmKPExsXiVRvkrKsUYBB psP+pmcX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvF+5yvGggMCFQvXT2VrYPzL08XIxSEkMINR onP/X0YQh0VgDavEmzmnWboYOTkkBC6xStw4rAVhx0k0P1jICGFXSvQ2LWQCsYUEVCRubl/FB DHpG6PE2d49rCAJYQE9iSNHf7BD2FESN9btYgax2QQMJN7s2AtWIyKgJHFv1WSwZmaBq4wSB5 acYwNJsAioSuw/NgmsgVfAR2LLlC6wzZwCvhKTTp1hhNjsI/Ht1wSwK0QF5CRWXm5hhagXlDg 58wnQBxxAQzUl1u/SBwkzC8hLbH87h3kCo8gsJFWzEKpmIalawMi8ilGjOLWoLLVI18hUL6ko Mz2jJDcxM0fX0MBULze1uDgxPTUnMalYLzk/dxMjMALqGRgYdzDuavc7xCjJwaQkyrtA3iBSi C8pP6UyI7E4I76oNCe1+BCjDAeHkgRvkD9QTrAoNT21Ii0zBxiLMGkJDh4lEd4UP6A0b3FBYm 5xZjpE6hSjMceG1eu/MHFMOrD9C5MQS15+XqqUOC87yCQBkNKM0jy4QbAUcYlRVkqYl5GBgUG IpyC1KDezBFX+FaM4B6OSMK8GyBSezLwSuH2vgE5hAjrlxTZ9kFNKEhFSUg2ME1t+7KywmHDK +/fxubP7p9bx3tfUPeKQP2Vi9tkTz8VexOQ3Wi9ekJgxWc9f1sb2cfC0yd/37dnVMHdiKVfQN w35v5nl6o0KGmte/HlrfS/CyirhoN6iu+/X7znppsK1+tS0PKF7L9wO37PYNi1LvERoix9Hu/ kqM4H7W6t+vIyMW9fpG/rmqBJLcUaioRZzUXEiAKpYCm8MAwAA X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1496338466!73001695!1 X-Originating-IP: [74.125.82.67] X-SpamReason: No, hits=0.0 required=7.0 tests=SUBJECT_RANDOMQ X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60957 invoked from network); 1 Jun 2017 17:34:26 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-10.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 1 Jun 2017 17:34:26 -0000 Received: by mail-wm0-f67.google.com with SMTP id k15so13063169wmh.3 for ; Thu, 01 Jun 2017 10:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=19h0JG+lXnxuLuzeI2AxUz+4mw4K/6SSii3/xXJoK6Q=; b=oxbt2MhLnrnD1P3K73jJy5FLG9OeksxfcqvPYmkNohnh0OcGPpSWZDs6d8EY87NlIW aNkBH6ut6KdFpxZRogwjD2nI0RGolFJYSC5WDb0uPE2pUVlUVvS0zcTQ29uLf6J/roEZ PK48zp62cnEXbL6zFeyL24zp0WjSZkPd286elDMhQMzoSB+1bPIQMyfe/TR1D62lf8Z7 Q92N4HHevFuXDQsJRzx+SV7sSvLmiAqRensEJwdKQDzs201rleDVowg4dmFQ6vOodr11 BqouyXWbThJGHOA9HdSDSCybloAYCeV/bvcmR7xk3Ao9YXlSQ6MAgfVkXpW4DynPmj0P AASQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=19h0JG+lXnxuLuzeI2AxUz+4mw4K/6SSii3/xXJoK6Q=; b=Teykue4oXWM0IDDgyAszKJDaGbnx6qBAy0POL2RKjNeIG8yNBV0VPwLCWy4Sk+FQCX BauwY2e7MnKuRKUC1Jf1eCrkD6z0Yy4mgZajT0ewppAqkzgIUuuKF5ROZjZzgI8i/Dwa tmOuWf96gnJX4Dz3IIGcVBg95ZM6xiw//jrHQE99gdVjGL66Kp9qWfuhlPGzcnjsecOH Q9ukbWInvHdUrTdWaYQp41r3MKJDxc9NowL8SjmRmOQbApS2nKNxSNRNA7JzR4jGrGEE QjEwxZGuSlVAYYZGBN/DzMnVweoTExxDG8WC3pGRDNn/qOZCUHFywLS0HvipiloNn8V0 5VCw== X-Gm-Message-State: AODbwcABWcWikD7NJgo+i4GtvOpzMyhKN1/pqSQ9LmBzJRObrMwxo6Du 7qnJIlReG83PYg== X-Received: by 10.223.148.226 with SMTP id 89mr2013464wrr.91.1496338466527; Thu, 01 Jun 2017 10:34:26 -0700 (PDT) Received: from Solace.fritz.box ([80.66.223.25]) by smtp.gmail.com with ESMTPSA id b81sm28887wmf.7.2017.06.01.10.34.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 10:34:25 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 01 Jun 2017 19:34:24 +0200 Message-ID: <149633846443.12814.10217161134560258968.stgit@Solace.fritz.box> In-Reply-To: <149633614204.12814.14390287626133023934.stgit@Solace.fritz.box> References: <149633614204.12814.14390287626133023934.stgit@Solace.fritz.box> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap , Andrew Cooper , Ian Jackson , Wei Liu , Jennifer Herbert Subject: [Xen-devel] [PATCH 07/15] tools: tracing: handle IRQs on/off events in xentrace and xenalyze X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP so the trace will show properly decoded info, rather than just a bunch of hex codes. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- Cc: George Dunlap Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu Cc: Jennifer Herbert --- tools/xentrace/formats | 2 ++ tools/xentrace/xenalyze.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 00c29b8..2e653ca 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -202,6 +202,8 @@ 0x0080200a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) do_irq [ irq = %(1)d ] 0x0080200b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) do_guest_irq [ irq = %(1)d ] 0x0080200c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) irq_exit [ irq = %(1)d, status = 0x%(2)x, in_irq = %(3)d ] +0x0080200d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) irq_disable [ from = 0x%(2)08x%(1)08x ] +0x0080200e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) irq_enable [ from = 0x%(2)08x%(1)08x ] 0x00084001 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) hpet create [ tn = %(1)d, irq = %(2)d, delta = 0x%(4)08x%(3)08x, period = 0x%(6)08x%(5)08x ] 0x00084002 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) pit create [ delta = 0x%(1)016x, period = 0x%(2)016x ] diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 3c2f600..c4a8340 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -8562,6 +8562,22 @@ void irq_process(struct pcpu_info *p) { } break; } + case TRC_HW_IRQ_DISABLE: + case TRC_HW_IRQ_ENABLE: + { + struct { + uint64_t addr; + } *r = (typeof(r))ri->d; + + if ( opt.dump_all ) + { + printf(" %s irq_%s, from %p\n", + ri->dump_header, + ri->event == TRC_HW_IRQ_DISABLE ? "disable" : "enable", + (void*)r->addr); + } + break; + } case TRC_HW_IRQ_CLEAR_VECTOR: case TRC_HW_IRQ_MOVE_FINISH : default: