From patchwork Tue Feb 16 18:13:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8330591 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 ACC01C02AA for ; Tue, 16 Feb 2016 18:15:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B498620295 for ; Tue, 16 Feb 2016 18:15:19 +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 A563B20268 for ; Tue, 16 Feb 2016 18:15:18 +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 1aVk7t-0004MI-G5; Tue, 16 Feb 2016 18:13:29 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVk7r-0004Kr-Ud for xen-devel@lists.xenproject.org; Tue, 16 Feb 2016 18:13:28 +0000 Received: from [193.109.254.147] by server-14.bemta-14.messagelabs.com id EB/87-07165-7C663C65; Tue, 16 Feb 2016 18:13:27 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1455646406!24337590!1 X-Originating-IP: [74.125.82.68] 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 48529 invoked from network); 16 Feb 2016 18:13:26 -0000 Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by server-5.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Feb 2016 18:13:26 -0000 Received: by mail-wm0-f68.google.com with SMTP id c200so21908890wme.0 for ; Tue, 16 Feb 2016 10:13:26 -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=Vc8YJ9IO9a25f4UnLyeB+Il1jH33+PQGDFr1uk8tk/Q=; b=ZgegHStQUKmw0hXHP6KGWBg8gRkAwT/OChGVfCogCaoVZtYh81B61NwgDmbL1qcBGb 5KGNV4zPyABKpI2+d8+tPI4cidpfhSg8Fi0qx8iwpbD6/pZhKJ3nacWmlGcUkKPYbzHo wpSxd5+6Mom50wDKOydYTt3P22R9hITerfY0iXFl6Nd7+sHuhfNPrmH3ziYIt0kIIL2p x6+dsM2OpA2fQk6SFMOlWSnNdH19QnHbOP/aChQn8AFQW46D+rtFlUByMgGZ6OsGh69r SzIh1cvIXhoG4sKWKoM6wWECnHZhaFuzXsd1WEyFpR3jmxOi2D+5g7lo8aVE4ZDHjKF1 wfOg== 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=Vc8YJ9IO9a25f4UnLyeB+Il1jH33+PQGDFr1uk8tk/Q=; b=i3273MUjLZjmijprPwFFYAaXaVdnVv3iYzINa1TvpcCNsvZdWUJhysenAarW9cxhjO u0aiZ2R6z+FflVhX+yHO+HmQv8mweRUgPtLHhyAZpLBIAxo/OG1IGYOOfHHRML+BazxL upgg8vgid0NWuhuBGxqD/6Gg+b9o3cDYhiipfkCKGPDpNcPIH2EUmG8Et11sosldzatV 0TMYLt8krYZfXJ42d3rNZvjmhxTtYSnJOAgkV9mBHYnCegxJ1Taz2a4Tgt11eTQZExN3 0KQIOI9ATNIInCoWu2FrmjB0LVWDCDJzMNMhQCfJJYxIjz6o+22SFuRTJ5BFC1R2/lfc D9lw== X-Gm-Message-State: AG10YOTPPYlNEeD5VGwuIxqwTerZL7s9ozjuW3ToNs6VXDM2EVFgNf9bGowiVCd1Cn7kSQ== X-Received: by 10.28.143.9 with SMTP id r9mr19725561wmd.37.1455646406286; Tue, 16 Feb 2016 10:13:26 -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 v22sm21634289wmv.12.2016.02.16.10.13.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2016 10:13:25 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Tue, 16 Feb 2016 19:13:22 +0100 Message-ID: <20160216181322.27876.60708.stgit@Solace.station> In-Reply-To: <20160216180550.27876.22680.stgit@Solace.station> References: <20160216180550.27876.22680.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 v2 15/16] 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 Reviewed-by: Konrad Rzeszutek Wilk --- Cc: George Dunlap Cc: Meng Xu Cc: Tianyang Chen Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu Cc: Olaf Hering --- Changes from v1: * '} * r =' turned into '} *r =', as requested during review. --- tools/xentrace/xenalyze.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 8f97f3a..dd21229 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); }