From patchwork Tue Feb 16 18:12:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 8330611 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 CB6699F399 for ; Tue, 16 Feb 2016 18:15:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00A7420295 for ; Tue, 16 Feb 2016 18:15:29 +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 0D62220268 for ; Tue, 16 Feb 2016 18:15:28 +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 1aVk7b-00049j-5a; Tue, 16 Feb 2016 18:13:11 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aVk7Z-00048R-De for xen-devel@lists.xenproject.org; Tue, 16 Feb 2016 18:13:09 +0000 Received: from [193.109.254.147] by server-3.bemta-14.messagelabs.com id 42/9D-28972-2B663C65; Tue, 16 Feb 2016 18:13:06 +0000 X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1455646385!23387298!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: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 52888 invoked from network); 16 Feb 2016 18:13:05 -0000 Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by server-4.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Feb 2016 18:13:05 -0000 Received: by mail-wm0-f67.google.com with SMTP id g62so21908395wme.2 for ; Tue, 16 Feb 2016 10:13:05 -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=RSVsvpCXmzwQY5KOVmvLVT4C73R3L/g87VhsAtpO888=; b=sU1cHNF6TnZJC5QLLwXSWX3chxc+JrGYEiUN1TQ5nN5EvyQCxCfXR9tslAhGPhYxFW tCEHDW0opfbx3NPEpKzMfh2nxuLubBoPSbXpvIIyEwzpkwKhzHZ61HGhT47upZ+30Kim lceVnUrzZPMilGWZ8cj0TRsvcJaQgQ1ZwYo6vHY2xm2Jj0pNPI1HbkGQ3/+49TLvu4O8 pXuUypG3luy7tK+esQpwMAitMr7Z+IAAnajOSWYSg1Gr0lkUjKnY/1cZfdUD3NPWVVjf NgzPNsy+IGIcFJQp0jCkd0U1331YveziJ7x5WpcD4hamQibpCWum2riOt2MDC5d3jY3V 1hig== 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=RSVsvpCXmzwQY5KOVmvLVT4C73R3L/g87VhsAtpO888=; b=Red5RFYug5xxZU7Yk0pPefKDeCvWZjML/vkWPmT6+s2vN0wGZzGGbom+EObZxojQOe JVRa6t1CGvDpBpPzL7/mX7I8fLpl2qwebcjUaOrGDhYyZ2nexXY7WTHoZFLLDL3SUFZL z7qfIqtqR9/+haJTXZirvZlwsEdricCqtbhMgnoNlTHebbLLTSp0VhEkrUO0IR0SXQoo lr82Bz//nv9ZGzOS9osRIzu2gLvdFI4S7JUsiThS6m7+csBv6dNYAWmbyh5B9EgNilme /6bJxiYyygRCnEcNOJVzzG7J4XIvjiiiNNuZGjUjxlH9d+R6tbHYFgpinqY0F/DbqvfW TUzA== X-Gm-Message-State: AG10YOSe7qCYehh/0+xCkfzJhaYv9FC3EaTv//EXlYpcfVkKHzD5AYqXYAtGPd8tQJ5k5Q== X-Received: by 10.194.63.202 with SMTP id i10mr23668080wjs.118.1455646385364; Tue, 16 Feb 2016 10:13:05 -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 g3sm31297429wjw.31.2016.02.16.10.13.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Feb 2016 10:13:04 -0800 (PST) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Tue, 16 Feb 2016 19:12:57 +0100 Message-ID: <20160216181257.27876.13452.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 , Ian Jackson Subject: [Xen-devel] [PATCH v2 13/16] 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 Reviewed-by: Konrad Rzeszutek Wilk Acked-by: George Dunlap --- Cc: George Dunlap 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 | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 17021f1..4ab2dba 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);