From patchwork Wed Mar 16 16:37:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8602531 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 86F789F6E1 for ; Wed, 16 Mar 2016 16:50:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6DCE202E6 for ; Wed, 16 Mar 2016 16:50:07 +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 CBFFD202F0 for ; Wed, 16 Mar 2016 16:50:06 +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 1agEbF-0001yg-PW; Wed, 16 Mar 2016 16:47:09 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agEbE-0001ya-I7 for xen-devel@lists.xenproject.org; Wed, 16 Mar 2016 16:47:08 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 00/CF-03443-B0E89E65; Wed, 16 Mar 2016 16:47:07 +0000 X-Env-Sender: prvs=876045ab4=dario.faggioli@citrix.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1458146824!12847339!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27110 invoked from network); 16 Mar 2016 16:47:07 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 16 Mar 2016 16:47:07 -0000 X-IronPort-AV: E=Sophos;i="5.24,345,1454976000"; d="asc'?scan'208";a="339399023" Message-ID: <1458146222.3102.938.camel@citrix.com> From: Dario Faggioli To: Date: Wed, 16 Mar 2016 17:37:02 +0100 In-Reply-To: <20160312113357.14480.40374.stgit@Solace.station> References: <20160312112621.14480.21747.stgit@Solace.station> <20160312113357.14480.40374.stgit@Solace.station> Organization: Citrix Inc. X-Mailer: Evolution 3.18.5.1 (3.18.5.1-1.fc23) MIME-Version: 1.0 X-DLP: MIA1 Cc: George Dunlap , Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH 1/3 v2] xenalyze: handle DOM0 operations 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.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable 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. Signed-off-by: Dario Faggioli --- Changes from v2:  * fix typo in subject;  * add missing S-o-b. Changes from v1:  * new patch in the series. 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);          }