From patchwork Sat Mar 12 11:34:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8571401 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 40F64C0553 for ; Sat, 12 Mar 2016 11:36:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C81B20361 for ; Sat, 12 Mar 2016 11:36:52 +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 6E5322035E for ; Sat, 12 Mar 2016 11:36:51 +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 1aehoI-00064b-GJ; Sat, 12 Mar 2016 11:34:18 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aehoH-00064I-Gm for xen-devel@lists.xenproject.org; Sat, 12 Mar 2016 11:34:17 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id F8/AB-04762-8BEF3E65; Sat, 12 Mar 2016 11:34:16 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-6.tower-206.messagelabs.com!1457782455!28226813!1 X-Originating-IP: [74.125.82.67] 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 44547 invoked from network); 12 Mar 2016 11:34:16 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-6.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Mar 2016 11:34:16 -0000 Received: by mail-wm0-f67.google.com with SMTP id n205so6708479wmf.2 for ; Sat, 12 Mar 2016 03:34:16 -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=RMYU1q/fS5g2UkjXzNmcPIdkdq5unW1DRNwr3anvSoU=; b=jqTRXyKKkgc1TDWnX8grdEqvPGMVU/GdyDUz2lb9hFtzTKa8EKVCXVCplCV2dnu5Lv yxeLbuAAPR8gEUQaWMNwiu4YM9HWaEEyD280N+RHYT6nsg+bxLe9ZJTiGD+Sk55kXUa/ w9ImfKL8J5fsA9ebS1HZ+E0uRGhvqZQpEFr9cijmgSI5zQrIoS1BJB435YJDLuCZYYnF lNTx02ljqvOK4b/7hnK+rXUzR3QagptvFHic89Nz7DcFiSwH+vhg+F0Ng/X0lXo90U8a ZUP05CJpAWLCWgBgTrk12MPxMhl/8GqY/+UQ8Hcw6/W1uneUZoaCYX07EzJalmVaIGXE 5BtQ== 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=RMYU1q/fS5g2UkjXzNmcPIdkdq5unW1DRNwr3anvSoU=; b=eiXQSX9UUoWw5eoNZ/xLiDgzWixQzDEZioIj0UTutIBTyHs/8E2D34Z+AtxcF027Xm VVlz0rO5mx0fRnyWFwpGmO/GCCmogtosJzpEgFqI6sFTJyUEFNIkbT6KdFryUXxme6n0 xSJM7ULI/NjKs09DOqdjWAi5RWJkOPuCKFQE3pUc6jbb0FC8LngeEri8Odi8Wi/G9eak 3gOumirZWJNW82IQZDNm5SmV7EQnYOl8+s71Uc1qGQWxlZVOY6wyTwFpWGf0OtFSoADF d5yiQDJEroKz9+dLP/USJsD1lzazXmWD0FNnXZwYh5oLF3Zk1TZ9qlHOYUzLIGZ2lQ92 2KLg== X-Gm-Message-State: AD7BkJIJbpJuxip3LmYiXHgGLvvXnzucNtP0dLv5k0a584ZylysUVZnVNENE0+6xzz612g== X-Received: by 10.28.145.8 with SMTP id t8mr7868416wmd.103.1457782455837; Sat, 12 Mar 2016 03:34:15 -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 c71sm6591258wmd.4.2016.03.12.03.34.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Mar 2016 03:34:14 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Sat, 12 Mar 2016 12:34:13 +0100 Message-ID: <20160312113412.14480.53700.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: Wei Liu , George Dunlap , Tianyang Chen , Ian Jackson , Meng Xu Subject: [Xen-devel] [PATCH 3/3] xenalyze: handle RTDS scheduler 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 so the trace will show properly decoded info, rather than just a bunch of hex codes. Signed-off-by: Dario Faggioli Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Meng Xu Acked-by: George Dunlap --- Cc: George Dunlap Cc: Meng Xu Cc: Tianyang Chen Cc: Ian Jackson Cc: Wei Liu --- Changes from v2: * use 64 bits ints for time values (now that the scheduler does that too), as suggested during review. Changes from v1: * '} * r =' turned into '} *r =', as requested during review. --- tools/xentrace/xenalyze.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 353bed7..b949986 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7823,6 +7823,58 @@ void sched_process(struct pcpu_info *p) r->rq_avgload, r->b_avgload); } break; + /* RTDS (TRC_RTDS_xxx) */ + case TRC_SCHED_CLASS_EVT(RTDS, 1): /* TICKLE */ + if(opt.dump_all) { + struct { + unsigned int cpu:16; + } *r = (typeof(r))ri->d; + + printf(" %s rtds:runq_tickle cpu %u\n", + ri->dump_header, r->cpu); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 2): /* RUNQ_PICK */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + uint64_t cur_dl, cur_bg; + } __attribute__((packed)) *r = (typeof(r))ri->d; + + printf(" %s rtds:runq_pick d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, r->cur_dl, r->cur_bg); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 3): /* BUDGET_BURN */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + uint64_t cur_bg; + int delta; + } __attribute__((packed)) *r = (typeof(r))ri->d; + + printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", " + "delta = %d\n", ri->dump_header, r->domid, + r->vcpuid, r->cur_bg, r->delta); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + uint64_t cur_dl, cur_bg; + } __attribute__((packed)) *r = (typeof(r))ri->d; + + printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, r->cur_dl, r->cur_bg); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET */ + if(opt.dump_all) + printf(" %s rtds:sched_tasklet\n", ri->dump_header); + break; default: process_generic(ri); }