From patchwork Fri Feb 5 18:35:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8238261 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 3F892BEEE5 for ; Fri, 5 Feb 2016 18:37:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38A1E20375 for ; Fri, 5 Feb 2016 18:37:57 +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 41AE72034A for ; Fri, 5 Feb 2016 18:37:56 +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 1aRlEb-0004le-0t; Fri, 05 Feb 2016 18:35:57 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlEZ-0004kl-Lr for xen-devel@lists.xenproject.org; Fri, 05 Feb 2016 18:35:55 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id 4D/F0-03225-A8BE4B65; Fri, 05 Feb 2016 18:35:54 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1454697354!20373715!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 40545 invoked from network); 5 Feb 2016 18:35:54 -0000 Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by server-13.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 Feb 2016 18:35:54 -0000 Received: by mail-wm0-f68.google.com with SMTP id 128so4182996wmz.3 for ; Fri, 05 Feb 2016 10:35:54 -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=8zwTbTYs2CpLhNwyUENCfbDfnRQHirmWMkmGVWOGC9w=; b=ygQ4+T1vJegk/1aWtxZcUDZOvIPTB+pbCX/PdTUdm85ZbDqevBzr+JZnxspMw8bLLa ZMTfPOJkCoWyuPZjkuNI6gWv3SGgtZtnkajGQRpnIAcgXBoDCTca1HlWxEcNqybsx5uP htzjEZ9OtlFD6v0NOBvAFF92ABn4JSfT1JdCgayxPcSXLVMbjoyj1EgVwmXkUGp+Y/Pl LfNkEUARppg9hQ3gZ3DZPXEEzbN1FfbyI4Vo9LbQ2B7IS1etQf8rxdLqCqiGDor2kpDi ZwV5LHvIOvisn/qFlPALj5Xa9Bw6Wp10cxOY+LLpmECQjSv6EUVQ9LnESX8D09CWCX+x eKpg== 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=8zwTbTYs2CpLhNwyUENCfbDfnRQHirmWMkmGVWOGC9w=; b=SkmvWrLeIFLUprJdJANXKDzHWrsetDRRCtAyJIvNZUC4P3ldqtC2ZVNl1+EcmczT9B 7sVYIvgPAppSV4n83IXbb3WK1RicajD5XIpyaOaNglzuzxxJ8YEF7hwaCL3mwhveBQMc VNfPEp9PBkwywupREM+X6xDQ6RBwxQf5nP7kJTC0DPiRCwt9uKQ+itkDDFnwCgdGRmi0 dNDs6I2s7JeOkM7SU8HqqXv20JmRS85rLBF/a+GPXgtDq7pmSfOlesWlsDzDtPLND5Aa yF0Jo+tPbxG/Z4r94Kt3+aSpGBkW1NMXszGV7F2sV4jSI8nS3yr3bgTlSx7r3vzr2B/O mOgw== X-Gm-Message-State: AG10YOQBN2GcPG3fWI2gdaicj4YHjWDHWFG2cqIwRfGPpRKGJcuRqC3T159N5ir1hsHisA== X-Received: by 10.194.111.199 with SMTP id ik7mr15295450wjb.25.1454697354037; Fri, 05 Feb 2016 10:35:54 -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 lc1sm17082635wjc.5.2016.02.05.10.35.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2016 10:35:53 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 05 Feb 2016 19:35:46 +0100 Message-ID: <20160205183546.4543.52248.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: George Dunlap , Wei Liu , Olaf Hering , Ian Jackson , Ian Campbell Subject: [Xen-devel] [PATCH 13/14] xenalyze: handle Credit2 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: Ian Jackson Cc: Ian Campbell Cc: Wei Liu Cc: Olaf Hering --- tools/xentrace/xenalyze.c | 101 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 885c4e4..00dbf7c 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7727,6 +7727,107 @@ void sched_process(struct pcpu_info *p) ri->dump_header, r->cpu); } break; + /* CREDIT 2 (TRC_CSCHED2_xxx) */ + case TRC_SCHED_CLASS_EVT(CSCHED2, 1): /* TICK */ + case TRC_SCHED_CLASS_EVT(CSCHED2, 4): /* CREDIT_ADD */ + case TRC_SCHED_CLASS_EVT(CSCHED2, 9): /* UPDATE_LOAD */ + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 2): /* RUNQ_POS */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16, pos; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:runq_insert d%uv%u, position %u\n", + ri->dump_header, r->domid, r->vcpuid, r->pos); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 3): /* CREDIT_BURN */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16, credit; + int delta; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:burn_credits d%uv%u, credit = %u, delta = %d\n", + ri->dump_header, r->domid, r->vcpuid, + r->credit, r->delta); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 5): /* TICKLE_CHECK */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int credit; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:tickle_check d%uv%u, credit = %u\n", + ri->dump_header, r->domid, r->vcpuid, r->credit); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 6): /* TICKLE */ + if(opt.dump_all) { + struct { + unsigned int cpu:16; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:runq_tickle cpu %u\n", + ri->dump_header, r->cpu); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 7): /* CREDIT_RESET */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int credit_start, credit_end; + unsigned int multiplier; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:reset_credits d%uv%u, " + "credit_start = %u, credit_end = %u, mult = %u\n", + ri->dump_header, r->domid, r->vcpuid, + r->credit_start, r->credit_end, r->multiplier); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 8): /* SCHED_TASKLET */ + if(opt.dump_all) + printf(" %s csched2:sched_tasklet\n", ri->dump_header); + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 10): /* RUNQ_ASSIGN */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int rqi; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:runq_assign d%uv%u on rq# %u\n", + ri->dump_header, r->domid, r->vcpuid, r->rqi); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 11): /* UPDATE_VCPU_LOAD */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int avgload; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:update_vcpu_load d%uv%u, avg_load = %u\n", + ri->dump_header, r->domid, r->vcpuid, r->avgload); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 12): /* UPDATE_RUNQ_LOAD */ + if(opt.dump_all) { + struct { + unsigned int rq_load:4, rq_avgload:28; + unsigned int rq_id:4, b_avgload:28; + } * r = (typeof(r))ri->d; + + printf(" %s csched2:update_rq_load rq# %u, load = %u, " + "avgload = %u, b_avgload = %u\n", + ri->dump_header, r->rq_id, r->rq_load, + r->rq_avgload, r->b_avgload); + } + break; default: process_generic(ri); }