From patchwork Fri Feb 5 18:35:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8238251 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 B245E9F3CD for ; Fri, 5 Feb 2016 18:37:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C675820375 for ; Fri, 5 Feb 2016 18:37:41 +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 DB56F2034A for ; Fri, 5 Feb 2016 18:37:40 +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 1aRlEO-0004dt-BB; Fri, 05 Feb 2016 18:35:44 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlEM-0004cY-H1 for xen-devel@lists.xenproject.org; Fri, 05 Feb 2016 18:35:42 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 85/54-08479-D7BE4B65; Fri, 05 Feb 2016 18:35:41 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1454697341!20782854!1 X-Originating-IP: [74.125.82.65] 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 8671 invoked from network); 5 Feb 2016 18:35:41 -0000 Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by server-8.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 5 Feb 2016 18:35:41 -0000 Received: by mail-wm0-f65.google.com with SMTP id p63so4184010wmp.1 for ; Fri, 05 Feb 2016 10:35:41 -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=RuwvCLFnXL8U76EfuH+GBkkpzlVmSmGDSMPszhH54bM=; b=tUNhZsWDTO2s2SYJk3ht4undbfdkY1YnIglH4DsB1kirQIEqEOCjjt4L7a1sIan0Jt MVSswlzmZeuoHe/GyW8fSbUpEBWxzEvilF53avie/2gqaLPGmXedMCdU1BjGtbHybwon ZZy5dtXIGfsFpAHdkV3UCCplxspm9t2+8ZO4fhBCqMqU57ds7ONLp/Fa8pEniutqbrrS +cB0wbYqVJMNJDqpfrvmEOjDi0qNoTlAPyScWNkGjXg+O4B9T5wix5jDSKdnRQTPluTB R4Zvgcl+1/AQcAKZ/QuPZ8OIGleVgxzX9kQ29CkfdAiOFf+t2C8qydjytCiuO5mW5if4 xsJQ== 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=RuwvCLFnXL8U76EfuH+GBkkpzlVmSmGDSMPszhH54bM=; b=GKghTL9ZMeajuAVQnKL3V2v7rEhg2RwBg5tZ8JUNEy7Mi643NLnNujU4Fi2qCObdS3 fHIy0PfE2bFlsMqb+fZX8a3Rkh2Rs5Dh+iMmqMxn63wTHn9cXOuTgDHsVjydm5TM5++x vEUQ74fy2WDLTuab5ADbWygzgQA7CVvL/+pfGxs7pq8hvWfgRp7wBT3IFo2rxNJivkUn 5xytpN3PQOjyR8CHqlPmIAiSr5j/4w3KNzXDOg7PlwZo/HtJn745XS2kqrH1S9/1cwA6 kFi76VtJH+puWEUGyE9UpPMntbGRYcD5BEZQaTxE3BbKix1YKTKKw3cDqyQ/wADUBMMG 5xdQ== X-Gm-Message-State: AG10YOQIigGika8H3LnSMIYbctMohIEd73BsuV8p8mhyqUMea8JruDmjMrSe0lW1gcS9eg== X-Received: by 10.28.126.205 with SMTP id z196mr36444050wmc.44.1454697341027; Fri, 05 Feb 2016 10:35:41 -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 198sm18548220wml.22.2016.02.05.10.35.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2016 10:35:40 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 05 Feb 2016 19:35:34 +0100 Message-ID: <20160205183533.4543.10293.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 12/14] xenalyze: handle Credit1 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 | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index be698aa..885c4e4 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7673,6 +7673,63 @@ void sched_process(struct pcpu_info *p) default: process_generic(&p->ri); } + } else if(ri->evt.sub == 2) { + /* TRC_SCHED_CLASS */ + switch(ri->event) + { + /* CREDIT (TRC_CSCHED_xxx) */ + case TRC_SCHED_CLASS_EVT(CSCHED, 1): /* SCHED_TASKLET */ + if(opt.dump_all) + printf(" %s csched:sched_tasklet\n", ri->dump_header); + break; + case TRC_SCHED_CLASS_EVT(CSCHED, 2): /* ACCOUNT_START */ + case TRC_SCHED_CLASS_EVT(CSCHED, 3): /* ACCOUNT_STOP */ + if(opt.dump_all) { + struct { + unsigned int domid, vcpuid, actv_cnt; + } * r = (typeof(r))ri->d; + + printf(" %s csched:acct_%s d%uv%u, active_vcpus %u\n", + ri->dump_header, + ri->event == TRC_SCHED_CLASS_EVT(CSCHED, 2) ? + "start" : "stop", + r->domid, r->vcpuid, + r->actv_cnt); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED, 4): /* STOLEN_VCPU */ + if(opt.dump_all) { + struct { + unsigned int peer_cpu, domid, vcpuid; + } * r = (typeof(r))ri->d; + + printf(" %s csched:stolen_vcpu d%uv%u from cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, r->peer_cpu); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED, 5): /* PICKED_CPU */ + if(opt.dump_all) { + struct { + unsigned int domid, vcpuid, cpu; + } * r = (typeof(r))ri->d; + + printf(" %s csched:pick_cpu %u for d%uv%u\n", + ri->dump_header, r->cpu, r->domid, r->vcpuid); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED, 6): /* TICKLE */ + if(opt.dump_all) { + struct { + unsigned int cpu; + } * r = (typeof(r))ri->d; + + printf(" %s csched:runq_tickle, cpu %u\n", + ri->dump_header, r->cpu); + } + break; + default: + process_generic(ri); + } } else { UPDATE_VOLUME(p, sched_verbose, ri->size); process_generic(&p->ri);