From patchwork Fri Jun 17 23:13:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9185157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 87B87601C0 for ; Fri, 17 Jun 2016 23:15:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7383327BE5 for ; Fri, 17 Jun 2016 23:15:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 650BA27F07; Fri, 17 Jun 2016 23:15:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9EF3827BE5 for ; Fri, 17 Jun 2016 23:15:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE2wx-00047p-H1; Fri, 17 Jun 2016 23:13:19 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE2ww-00046n-NM for xen-devel@lists.xenproject.org; Fri, 17 Jun 2016 23:13:18 +0000 Received: from [193.109.254.147] by server-16.bemta-14.messagelabs.com id F8/48-24830-D0484675; Fri, 17 Jun 2016 23:13:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLIsWRWlGSWpSXmKPExsXiVRvkpMvbkhJ u8HoDl8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmtG47xZzwSvTiqcLt7E0MN5S6WLk4hASmMEo ca/zBnMXIycHi8AaVonbp5hAEhICl1glHl+8yQqSkBCIkdi37zljFyM7kF0p0SIDEhUSUJG4u X0VE8SchUwS95o6weYIC+hJHDn6gx3CdpZ4fmAX2Bg2AQOJNzv2gtkiAkoS91ZNBmtmFljAKH H7eBMrxBGqEg1H7zGC2LwC3hLzzi4DG8op4Cux+souNojNPhIXzz0Cs0UF5CRWXm5hhagXlDg 58wlLFyMH0FBNifW79EHCzALyEtvfzmGewCgyC0nVLISqWUiqFjAyr2LUKE4tKkst0jU00ksq ykzPKMlNzMzRNTQ00ctNLS5OTE/NSUwq1kvOz93ECAx+BiDYwXh2mvMhRkkOJiVR3iuVKeFCf En5KZUZicUZ8UWlOanFhxg1ODgEJpydO51JiiUvPy9VSYJXsxmoTrAoNT21Ii0zBxifMKUSHD xKIryGIGne4oLE3OLMdIjUKUZdji1T761lEgKbISXOqwJSJABSlFGaBzcCliouMcpKCfMyAh0 oxFOQWpSbWYIq/4pRnINRSZj3WhPQFJ7MvBK4Ta+AjmACOkJzXjLIESWJCCmpBsbYmeVnJKwW Gyaef5x8yt/uYK6wOtfVwpvzsqRia/f81fQ79HRetqS0zd6TpukZbPcXPlMObEsUmP87ZnHXk Zcfz78u4LH4yrf8whNntTnTz+iWf29ZvDD3vOcCloybt02aBBboRh78Zrt+86wrtxSdFkVtF3 TSdr6htLpONqej9WM3u95U+/tKLMUZiYZazEXFiQAx52K0EAMAAA== X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1466205196!47554708!1 X-Originating-IP: [74.125.82.66] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19469 invoked from network); 17 Jun 2016 23:13:17 -0000 Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by server-4.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jun 2016 23:13:17 -0000 Received: by mail-wm0-f66.google.com with SMTP id r201so1106742wme.0 for ; Fri, 17 Jun 2016 16:13:16 -0700 (PDT) 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-transfer-encoding; bh=+vgtfqdePR0BzyfRNoTCbodS9CVw6yzxSO+UtjRit6I=; b=Z9oKOTYyRJVhOhgD5yAEKtOas0mA7KVPCexIj0vf9sDSLev2kT7bozxwc/2TaJ2ojd 79o6n+8UfH5OecJzOF+Cy77BJm2jRwlw6t6xpGV69yA2UhE1l/4ik6vafrQaOcN+mNsi d2UH61ZU7Ao8yn1z0f6tdbhMFQoFi6nhunEPgqZecqTak8g54tr5jSASh4E5bRaCYe5k d+XCUOmXRmwHuQ6vBHHjEUMJth1hm8DldFt/qxJtZDAubmHrW+bF0TWmbNFi2T5sY/m6 JVtUAZWiwMyr8en1SMfL4h+1U39zTnpjRgaHUC5t5mFPpb9x79rcuXTGzrNfM98RPJ4D FBAQ== 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-transfer-encoding; bh=+vgtfqdePR0BzyfRNoTCbodS9CVw6yzxSO+UtjRit6I=; b=L2t9/KEUeTp/sBuz+wNmp+Ls0sD3uQhr9oi/1w24OA2QWov7bGsJNEILdTvWIHXgmB uxl9s5MJeETU4Z7CQE9jyw6tTXyh6jdUgojsoYJgTZP7GQR7PEUtz5fAhPKKYgD0ix1h +u+iUqZKZKe9KZj63YHycG8WwBLjvdqO18kzTzNfLnB0L6qPW384etwedMKdevnAU0PW 3RG9ahoDfN1LryCFWGs4T9Bo1WEvtw1GERThYsrAu88jvitUp9+FjxqFs/iG+6nd0mv7 fAhkAxw3AZLyTThGbhWRpZ89gMLtet8Clfjlg0vmWB7PTrQm18PbpFfw04Kay0/Bk5/o dDiA== X-Gm-Message-State: ALyK8tKZqj9LhRbey+n48tZIIfdBKRWboU+yTtXlwFU31FCGLW0JlsFPGmTBUkqpg6NM1g== X-Received: by 10.28.195.131 with SMTP id t125mr638138wmf.25.1466205196460; Fri, 17 Jun 2016 16:13:16 -0700 (PDT) Received: from Solace.fritz.box (net-93-65-149-191.cust.vodafonedsl.it. [93.65.149.191]) by smtp.gmail.com with ESMTPSA id u6sm50677902wjy.17.2016.06.17.16.13.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 16:13:15 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Sat, 18 Jun 2016 01:13:14 +0200 Message-ID: <146620519418.29766.8883126830309807870.stgit@Solace.fritz.box> In-Reply-To: <146620492155.29766.10321123657058307698.stgit@Solace.fritz.box> References: <146620492155.29766.10321123657058307698.stgit@Solace.fritz.box> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: Wei Liu , Anshul Makkar , Ian Jackson , George Dunlap Subject: [Xen-devel] [PATCH 16/19] tools: tracing: deal with new Credit2 events X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP more specifically, with: TICKLE_NEW, RUNQ_MAX_WEIGHT, MIGRATE, LOAD_CHECK, LOAD_BALANCE and PICKED_CPU, and in both both xenalyze and formats (for xentrace_format). Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu Cc: Anshul Makkar --- tools/xentrace/formats | 6 +++ tools/xentrace/xenalyze.c | 78 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 2e58d03..caafb5f 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -55,6 +55,12 @@ 0x0002220a CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_assign [ dom:vcpu = 0x%(1)08x, rq_id = %(2)d ] 0x0002220b CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:updt_vcpu_load [ dom:vcpu = 0x%(3)08x, vcpuload = 0x%(2)08x%(1)08x, wshift = %(4)d ] 0x0002220c CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:updt_runq_load [ rq_load[16]:rq_id[8]:wshift[8] = 0x%(5)08x, rq_avgload = 0x%(2)08x%(1)08x, b_avgload = 0x%(4)08x%(3)08x ] +0x0002220d CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle_new [ dom:vcpu = 0x%(1)08x, processor = %(2)d credit = %(3)d ] +0x0002220e CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_max_weight [ rq_id[16]:max_weight[16] = 0x%(1)08x ] +0x0002220f CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:migrrate [ dom:vcpu = 0x%(1)08x, rq_id[16]:trq_id[16] = 0x%(2)08x ] +0x00022210 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:load_check [ lrq_id[16]:orq_id[16] = 0x%(1)08x, delta = %(2)d ] +0x00022211 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:load_balance [ l_bavgload = 0x%(2)08x%(1)08x, o_bavgload = 0x%(4)08x%(3)08x, lrq_id[16]:orq_id[16] = 0x%(5)08x ] +0x00022212 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:pick_cpu [ b_avgload = 0x%(2)08x%(1)08x, dom:vcpu = 0x%(3)08x, rq_id[16]:new_cpu[16] = %(4)d ] 0x00022801 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:tickle [ cpu = %(1)d ] 0x00022802 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:runq_pick [ dom:vcpu = 0x%(1)08x, cur_deadline = 0x%(3)08x%(2)08x, cur_budget = 0x%(5)08x%(4)08x ] diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index f2f97bd..d223de6 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7725,7 +7725,6 @@ void sched_process(struct pcpu_info *p) /* 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) { @@ -7788,11 +7787,15 @@ void sched_process(struct pcpu_info *p) if(opt.dump_all) printf(" %s csched2:sched_tasklet\n", ri->dump_header); break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 9): /* UPDATE_LOAD */ + if(opt.dump_all) + printf(" %s csched2:update_load\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; + unsigned int rqi:16; } *r = (typeof(r))ri->d; printf(" %s csched2:runq_assign d%uv%u on rq# %u\n", @@ -7834,6 +7837,77 @@ void sched_process(struct pcpu_info *p) avgload, r->rq_avgload, b_avgload, r->b_avgload); } break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 13): /* TICKLE_NEW */ + if (opt.dump_all) { + struct { + unsigned vcpuid:16, domid:16; + unsigned processor, credit; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:runq_tickle_new d%uv%u, " + "processor = %u, credit = %u\n", + ri->dump_header, r->domid, r->vcpuid, + r->processor, r->credit); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 14): /* RUNQ_MAX_WEIGHT */ + if (opt.dump_all) { + struct { + unsigned rqi:16, max_weight:16; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:update_max_weight rq# %u, max_weight = %u\n", + ri->dump_header, r->rqi, r->max_weight); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 15): /* MIGRATE */ + if (opt.dump_all) { + struct { + unsigned vcpuid:16, domid:16; + unsigned rqi:16, trqi:16; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:migrate d%uv%u rq# %u --> rq# %u\n", + ri->dump_header, r->domid, r->vcpuid, r->rqi, r->trqi); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 16): /* LOAD_CHECK */ + if (opt.dump_all) { + struct { + unsigned lrqi:16, orqi:16; + unsigned load_delta; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:load_balance_check lrq# %u, orq# %u, " + "delta = %u\n", + ri->dump_header, r->lrqi, r->orqi, r->load_delta); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 17): /* LOAD_BALANCE */ + if (opt.dump_all) { + struct { + uint64_t lb_avgload, ob_avgload; + unsigned lrqi:16, orqi:16; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:load_balance_begin lrq# %u, " + "avg_load = %"PRIu64" -- orq# %u, avg_load = %"PRIu64"\n", + ri->dump_header, r->lrqi, r->lb_avgload, + r->orqi, r->ob_avgload); + } + break; + case TRC_SCHED_CLASS_EVT(CSCHED2, 19): /* PICKED_CPU */ + if (opt.dump_all) { + struct { + uint64_t b_avgload; + unsigned vcpuid:16, domid:16; + unsigned rqi:16, cpu:16; + } *r = (typeof(r))ri->d; + + printf(" %s csched2:picked_cpu d%uv%u, rq# %u, cpu %u\n", + ri->dump_header, r->domid, r->vcpuid, r->rqi, r->cpu); + } + break; /* RTDS (TRC_RTDS_xxx) */ case TRC_SCHED_CLASS_EVT(RTDS, 1): /* TICKLE */ if(opt.dump_all) {