From patchwork Sat Mar 12 11:33:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8571391 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5E56A9F7CA for ; Sat, 12 Mar 2016 11:36:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C82B20375 for ; Sat, 12 Mar 2016 11:36:48 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id A120B20361 for ; Sat, 12 Mar 2016 11:36:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aeho5-00060Z-0q; Sat, 12 Mar 2016 11:34:05 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aeho3-00060M-GL for xen-devel@lists.xenproject.org; Sat, 12 Mar 2016 11:34:03 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 68/1D-03651-AAEF3E65; Sat, 12 Mar 2016 11:34:02 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1457782440!28074530!1 X-Originating-IP: [74.125.82.66] X-SpamReason: No, hits=0.2 required=7.0 tests=RCVD_ILLEGAL_IP X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59446 invoked from network); 12 Mar 2016 11:34:00 -0000 Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by server-13.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Mar 2016 11:34:00 -0000 Received: by mail-wm0-f66.google.com with SMTP id p65so6745573wmp.1 for ; Sat, 12 Mar 2016 03:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=CgZcWK+K7j/3VYFJet6sZSObzTKA6JfW6h/Sm3TL5c4=; b=qCKLMy72TSdxrST6koMVvSuiKrfFc2hDjAZWcS/6nW/o9COqAx3XPzODm7JqS3GWoZ wbErzskSL8lW8y6Dzfb+i5nhJE+xV1UCKIww5iw6k/lhK7PaMpKwUy/7gBJBJcR/sCc/ nV6KMfIgYIb5KLtLE1EOwqBF5u53jJQGKcTAAw7EgaJ254O7nZb7SnyIhJuGPXrmb9jI q/G3AHpTGdLdJkszAtRYqLPFpkch4roPJjcWsaWYUy3/EHVFGZXSVN6Iyxqqxvn8Hnh1 9OhbEMrtP6TRe8gEisS35WCcPOXioDk6b7OlH5qq9PXRhavrZDGz9jfyeqs3Y+weXvXQ +XWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=CgZcWK+K7j/3VYFJet6sZSObzTKA6JfW6h/Sm3TL5c4=; b=SW6sSWG1dwm8bHToZz+lOuopKNvvT1OzvRRTb1N8DdpILxMktcdcXp4FgO2hwMFtFB IK8gQlYbxnOetasuj0tZRJbWB3CppHXFpbCenq0FAdXp5ygyE3j64ygiE/DeZU/w2hOO t9cQiFiC5gnNvNu3tPbRj4WHvl+77D5onYzRtfKrR0l+z6OZSBySkM6wbJy1DsTJK6oh At0lASHc++08XEcBXPqnsXi7jyeJJM4YTOJ/T+1uzwnI5esDRPaO6UGeYmZNhgnbjFfa Sc60SdLV4oc6cmXwMABX69NPBLwd2FvCLuZmzsfzV+bQjIsAQdMsWWviR0vQQHjkzFc7 fpjQ== X-Gm-Message-State: AD7BkJJSFYbyxMoLJ0ZS6tCPfZZCIX4+/tfGtWwjDPWvZhVifmZTU+d0pVJGuZB600O7Jw== X-Received: by 10.28.137.139 with SMTP id l133mr8313454wmd.1.1457782440021; Sat, 12 Mar 2016 03:34:00 -0800 (PST) Received: from Solace.station (net-2-35-170-8.cust.vodafonedsl.it. [2.35.170.8]) by smtp.gmail.com with ESMTPSA id i5sm12794449wjx.15.2016.03.12.03.33.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Mar 2016 03:33:58 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Sat, 12 Mar 2016 12:33:57 +0100 Message-ID: <20160312113357.14480.40374.stgit@Solace.station> In-Reply-To: <20160312112621.14480.21747.stgit@Solace.station> References: <20160312112621.14480.21747.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap , Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH 1/3] xenalyze: handle DOM0 operaions events 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-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP (i.e., domain creation and destruction) so the trace will show properly decoded info, rather than just a bunch of hex codes. Acked-by: George Dunlap --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu Cc: Konrad Rzeszutek Wilk --- Changes from v1: * new patch in the series. --- tools/xentrace/xenalyze.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index d4a5b0c..353bed7 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p) } } + +#define TRC_DOM0_SUB_DOMOPS 1 +void dom0_process(struct pcpu_info *p) +{ + struct record_info *ri = &p->ri; + + switch(ri->evt.sub) + { + case TRC_DOM0_SUB_DOMOPS: + if(opt.dump_all) { + struct { + unsigned int domid; + } *r = (typeof(r))ri->d; + + printf(" %s %s domain d%u\n", ri->dump_header, + ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying", + r->domid); + } + break; + default: + process_generic(&p->ri); + } +} + /* ---- Base ----- */ void dump_generic(FILE * f, struct record_info *ri) { @@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) { hw_process(p); break; case TRC_DOM0OP_MAIN: + dom0_process(p); + break; default: process_generic(ri); }