From patchwork Fri Feb 5 18:35:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8238271 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 061FC9F3CD for ; Fri, 5 Feb 2016 18:38:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E11520392 for ; Fri, 5 Feb 2016 18:38:10 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19D6E20375 for ; Fri, 5 Feb 2016 18:38:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlEq-0004v6-Lc; Fri, 05 Feb 2016 18:36:12 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlEo-0004tt-PW for xen-devel@lists.xenproject.org; Fri, 05 Feb 2016 18:36:10 +0000 Received: from [85.158.139.211] by server-10.bemta-5.messagelabs.com id DA/B2-17090-99BE4B65; Fri, 05 Feb 2016 18:36:09 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1454697369!12235462!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23185 invoked from network); 5 Feb 2016 18:36:09 -0000 Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by server-15.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 Feb 2016 18:36:09 -0000 Received: by mail-wm0-f66.google.com with SMTP id r129so4195793wmr.0 for ; Fri, 05 Feb 2016 10:36:09 -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-type:content-transfer-encoding; bh=WfYhLHti2bZlMZ0A35Me7O61/af/8BFMzRB/+A6kBV4=; b=l+pwm16xQ7ac6JEj+ul/u3EkQP2SzCH8Ra0juwPwBFaVYttaJsL0+ArTMdXBlKXZr/ jmDIxIvRt3ubUBWxWvKi2b28bX8nbShtauyaovkYjWrPMMm2EHA0gDIdDGOJEtmjgslI oA09xfCpw91z5LxRejkkrCRj0yo45b1eU7SrPaCH2ouR914cJMVByaqdIfo2YE8TMsEd HpuCqGiE1eZs4n1K4AM08koxJLLVUG2UhoeYWAkFmD3SY8MNiI3nWqY5RwmE+QGyFZSf 3enpZMVTcWR8QhIxbC/DuTv2nyJJKEjA2p0w5FNf1W3WvuvNSFXlzr36Qx8XS/ykDrIb L/+Q== 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-type :content-transfer-encoding; bh=WfYhLHti2bZlMZ0A35Me7O61/af/8BFMzRB/+A6kBV4=; b=elBX9x/q46qH3wcxSeNvTPD3XXTHA05U5a5eB5hlRK5mHij3KICoC/LHvMNNfcLyIo qizFtlIs4wCLXYClKb97Q1ufsdh7lZIMD65dFXlUvUHnKg7JVAFpU0UiU2B5SGwo8Ft+ Vde1NEl3O2iJ9zwvawavU331SBww7h1jopVbNEWzGeinL3ryavfhFyN2Je5AV68h0+xW YR90/sQIJMC2rdsq4n0dDsp6r/fb1i1Tgp42zIYPp9nJBkBJKci7d+nmZ2TLD++iGDj2 UbqhJnO/c+zlwE8NH/tDNSDEQq5/M5qsg/ZN3RcgXslOOqk9kVZ4CHzw1NDRHIgPKiR2 U/Og== X-Gm-Message-State: AG10YOQB654NIcuHQrHSTWk/m+QYAC8Ms2AnrXskBw8UQ+SkgNpmfQ1giksRAt+sCLn4cA== X-Received: by 10.194.57.100 with SMTP id h4mr17917991wjq.21.1454697369144; Fri, 05 Feb 2016 10:36:09 -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 17sm18542822wmy.15.2016.02.05.10.36.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2016 10:36:08 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 05 Feb 2016 19:35:59 +0100 Message-ID: <20160205183559.4543.27301.stgit@Solace.station> In-Reply-To: <20160205183137.4543.56523.stgit@Solace.station> References: <20160205183137.4543.56523.stgit@Solace.station> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: Olaf Hering , Wei Liu , Ian Campbell , George Dunlap , Tianyang Chen , Ian Jackson , Meng Xu Subject: [Xen-devel] [PATCH 14/14] xenalyze: handle RTDS scheduler events X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 so the trace will show properly decoded info, rather than just a bunch of hex codes. Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Meng Xu Cc: Tianyang Chen Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu Cc: Olaf Hering --- tools/xentrace/xenalyze.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 00dbf7c..103e8b2 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7828,6 +7828,65 @@ 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; + unsigned int cur_dl_lo, cur_dl_hi; + unsigned int cur_bg_lo, cur_bg_hi; + } * r = (typeof(r))ri->d; + uint64_t dl = (((uint64_t)r->cur_dl_hi) << 32) + r->cur_dl_lo; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:runq_pick d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, dl, bg); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 3): /* BUDGET_BURN */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int cur_bg_lo, cur_bg_hi; + int delta; + } * r = (typeof(r))ri->d; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", " + "delta = %d\n", ri->dump_header, r->domid, + r->vcpuid, bg, r->delta); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int cur_dl_lo, cur_dl_hi; + unsigned int cur_bg_lo, cur_bg_hi; + } * r = (typeof(r))ri->d; + uint64_t dl = (((uint64_t)r->cur_dl_hi) << 32) + r->cur_dl_lo; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, dl, 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); }