From patchwork Fri Jul 15 14:50:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9232171 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 DCAB160574 for ; Fri, 15 Jul 2016 14:52:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDC5727AC2 for ; Fri, 15 Jul 2016 14:52:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C260A27F94; Fri, 15 Jul 2016 14:52:43 +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 3C83027AC2 for ; Fri, 15 Jul 2016 14:52:43 +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 1bO4RU-0006Xg-Rv; Fri, 15 Jul 2016 14:50:16 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO4RT-0006WQ-DB for xen-devel@lists.xenproject.org; Fri, 15 Jul 2016 14:50:15 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 25/70-13744-628F8875; Fri, 15 Jul 2016 14:50:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPIsWRWlGSWpSXmKPExsXiVRvkpKv2oyP c4FEXu8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvFh7h72gg+mFVcm7GBtYHyg0sXIxSEkMJ1R 4umjTjYQh0VgDatEw4npLCCOhMAlVonvU2cydjFyAjkxEs1bn7JB2FUSGya3gsWFBFQkbm5fx QQxajGTxLW5X8GKhAX0JI4c/cEOYbtJbP71ignEZhMwkHizYy8riC0ioCRxb9VksGZmgQWMEr ePN4ElWARUJU5PvQvWzCvgLXFqYTPYNk4BX4nn99ewQGz2kXhxdzbYUFEBOYmVl1tYIeoFJU7 OfAJUwwE0VFNi/S59kDCzgLzE9rdzmCcwisxCUjULoWoWkqoFjMyrGNWLU4vKUot0DfWSijLT M0pyEzNzdA0NzPRyU4uLE9NTcxKTivWS83M3MQIjgAEIdjDufO50iFGSg0lJlHdjSke4EF9Sf kplRmJxRnxRaU5q8SFGDQ4OgQln505nkmLJy89LVZLgffYNqE6wKDU9tSItMwcYozClEhw8Si K870DSvMUFibnFmekQqVOMuhxbpt5byyQENkNKnHchSJEASFFGaR7cCFi6uMQoKyXMywh0oBB PQWpRbmYJqvwrRnEORiVh3h8gU3gy80rgNr0COoIJ6Ahr83aQI0oSEVJSDYw21ZdaCk0n/19U 5xYpNsOvXjv3WY//qRWy3yRbP95TDQjLtv1rPl1kbuzm13v5H7E7veY5JZWbMuX6vh1Pk0x+H JHd85xhtwPLhRMz93C9svyQcLZY8rFN7fzqALdN0TfrW2d1RH1ewrAqbp7orVz17ssmlxa/t9 ANikk0Fsmw+s3E9bEy21WJpTgj0VCLuag4EQCys1wlEgMAAA== X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1468594213!24103672!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.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9787 invoked from network); 15 Jul 2016 14:50:14 -0000 Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by server-9.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 15 Jul 2016 14:50:14 -0000 Received: by mail-wm0-f66.google.com with SMTP id o80so2475984wme.0 for ; Fri, 15 Jul 2016 07:50:14 -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=4x+R1j/ygzsanZfnrru0fnjZbJzshdWlZXTtIFEAJWk=; b=jDYqcrRaVDZnkhW7a4mQ3D13rkHxWhkz0x8HwrtAsuBxXryx2HyYaVjYnXzyxhpkut iYEWqeu8L5ItigCpBNJjKWsJLT7SC3uIrtnazgJ1uLPGi/HhiA9Ij5ojarFf6yOOlOhJ w13cSVGImp+9bwhvYYWvNHioeOTQmIz01UfeCiJml+Z3vJcU1luOQLHuUE2uB07SNJPv wypgFLSYslB/+ErI49o/F/Wq0yV7lST+0Nr6QdRuRgUaHtfDUYQVMZkl7zcpsgKSM99d ArZS0WSTitQDGMAYzQOi/kbX/RsjPYEp3EvUHqU5hqSnDNCPWA1M69leZDl64Oek9hEb 0hVA== 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=4x+R1j/ygzsanZfnrru0fnjZbJzshdWlZXTtIFEAJWk=; b=gfd4EQTcJja/oPlcVUqPnZyz6KIOlCPowkT2yFCqBSaTXMHUXs2Eja/WHZvqTK38Yh r/CIzqeGLrKRde9SMTHS4QzdqkOnwVTZ8dkFLbbeyrQZMCEYOJ0bjItpPPM4T9y4qzsv KlYgJ2XUtqe2wcA+7YIgl3l5DLvendoTjRNbwM/JZ26BGOKymB5j+gF1AFJlC7UrL8Y2 gd1P2PPEI68LJtrD9eq2AJ3APWau9OdVh3TmAL6oeUFICWOGu8Z3+SPu1z4aHetBpZad fwpLfDfUkWBPf2WUTLR6OCKERu/wTu+OfWABompBfdcx/z4tDlMf37ADVFLXFr4XhbSl IDKQ== X-Gm-Message-State: ALyK8tJIW085ylVHtcCVjhIOsgBiRvtyG45KtaEEYAps72TRpyUCK5SbJDQjSGEZv2Os+A== X-Received: by 10.28.203.200 with SMTP id b191mr38261558wmg.1.1468594213762; Fri, 15 Jul 2016 07:50:13 -0700 (PDT) Received: from Solace.fritz.box (net-188-217-84-158.cust.vodafonedsl.it. [188.217.84.158]) by smtp.gmail.com with ESMTPSA id jq9sm1114239wjb.38.2016.07.15.07.50.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 07:50:12 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Fri, 15 Jul 2016 16:50:11 +0200 Message-ID: <146859421148.10217.7506620591928080725.stgit@Solace.fritz.box> In-Reply-To: <146859397891.10217.10155969474613302167.stgit@Solace.fritz.box> References: <146859397891.10217.10155969474613302167.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 v2 09/11] 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 Acked-by: Wei Liu --- 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) {