From patchwork Wed Oct 11 18:02:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Xu X-Patchwork-Id: 10000289 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 E8D9C60216 for ; Wed, 11 Oct 2017 18:04:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7E6028AFB for ; Wed, 11 Oct 2017 18:04:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC81728B00; Wed, 11 Oct 2017 18:04:40 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 D9EDB28AFB for ; Wed, 11 Oct 2017 18:04:39 +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 1e2LKv-0002sq-3l; Wed, 11 Oct 2017 18:02:29 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2LKu-0002sT-15 for xen-devel@lists.xen.org; Wed, 11 Oct 2017 18:02:28 +0000 Received: from [193.109.254.147] by server-11.bemta-6.messagelabs.com id 88/CE-20813-3BC5ED95; Wed, 11 Oct 2017 18:02:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCLMWRWlGSWpSXmKPExsUyr8m9UXdjzL1 Ig/f/dC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1owX548wF7yXruhb28zcwNgj0sXIxSEk0M8k sbNtKWsXIycHm4CKxPENj8BsEQFpiWufLzOCFDELbGSU2H38HTtIQljAU+LkummMIDaLgKpEw 6z/bCA2r4CzxMH978GaJQTkJE4emwxmcwq4SDz/18rcxcgBtM1Z4neXMURJqMSaxeeZYMofP3 zAOIGRZwEjwypGjeLUorLUIl0jM72kosz0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjEC /MwDBDsYzCwIPMUpyMCmJ8gbr3YsU4kvKT6nMSCzOiC8qzUktPsQow8GhJMHbHQ2UEyxKTU+t SMvMAQYgTFqCg0dJhFcBGIRCvMUFibnFmekQqVOMxhzHNl3+w8TRcfPuHyYhlrz8vFQpcd5Uk EkCIKUZpXlwg2CRcYlRVkqYlxHoNCGegtSi3MwSVPlXjOIcjErCvHNApvBk5pXA7XsFdAoT0C miaXdATilJREhJNTDqNMUfOXEtuDLza/G8pMTYFseGb7P006ec9BAr0P5ndMaqILY7aXlo8Pd eez3Lfybr3nCv/xIiVPmndMWy+Fel/AdneOSmxa7xuc+y8OM05k5ew2OJV+2KmXZOP/vKfdMB 61KhCUwF/KXvlL2VQk+liSzuVj5WtHjnySwmu12p4r3bs48yfVViKc5INNRiLipOBABpvOU4h wIAAA== X-Env-Sender: mengxu@cis.upenn.edu X-Msg-Ref: server-4.tower-27.messagelabs.com!1507744945!110433998!1 X-Originating-IP: [158.130.71.129] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19217 invoked from network); 11 Oct 2017 18:02:25 -0000 Received: from renard.seas.upenn.edu (HELO fox.seas.upenn.edu) (158.130.71.129) by server-4.tower-27.messagelabs.com with SMTP; 11 Oct 2017 18:02:25 -0000 Received: from panda-6c.cis.upenn.edu (SEASnet-48-12.cis.upenn.edu [158.130.48.13]) (authenticated bits=0) by fox.seas.upenn.edu (8.15.2/8.14.5) with ESMTPSA id v9BI2DV5017412 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT); Wed, 11 Oct 2017 14:02:15 -0400 From: Meng Xu To: xen-devel@lists.xen.org Date: Wed, 11 Oct 2017 14:02:05 -0400 Message-Id: <1507744926-3950-5-git-send-email-mengxu@cis.upenn.edu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507744926-3950-1-git-send-email-mengxu@cis.upenn.edu> References: <1507744926-3950-1-git-send-email-mengxu@cis.upenn.edu> X-Proofpoint-Virus-Version: vendor=nai engine=5600 definitions=5800 signatures=585085 X-Proofpoint-Spam-Reason: safe Cc: wei.liu2@citrix.com, george.dunlap@eu.citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xumengpanda@gmail.com, Meng Xu Subject: [Xen-devel] [PATCH v4 4/5] xentrace: enable per-VCPU extratime flag for RTDS 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Change repl_budget event output for xentrace formats and xenalyze Signed-off-by: Meng Xu Reviewed-by: Dario Faggioli --- Changes from v3 Handle burn_budget event No changes from v2 Changes from v1 Add this changes from v1 --- tools/xentrace/formats | 4 ++-- tools/xentrace/xenalyze.c | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index d6e7e3f..8b286c3 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -74,8 +74,8 @@ 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 ] -0x00022803 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:burn_budget [ dom:vcpu = 0x%(1)08x, cur_budget = 0x%(3)08x%(2)08x, delta = %(4)d ] -0x00022804 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:repl_budget [ dom:vcpu = 0x%(1)08x, cur_deadline = 0x%(3)08x%(2)08x, cur_budget = 0x%(5)08x%(4)08x ] +0x00022803 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:burn_budget [ dom:vcpu = 0x%(1)08x, cur_budget = 0x%(3)08x%(2)08x, delta = %(4)d, priority_level = %(5)d, has_extratime = %(6)x ] +0x00022804 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:repl_budget [ dom:vcpu = 0x%(1)08x, priority_level = 0x%(2)08d cur_deadline = 0x%(4)08x%(3)08x, cur_budget = 0x%(6)08x%(5)08x ] 0x00022805 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:sched_tasklet 0x00022806 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) rtds:schedule [ cpu[16]:tasklet[8]:idle[4]:tickled[4] = %(1)08x ] diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 79bdba7..19e050f 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7935,23 +7935,29 @@ void sched_process(struct pcpu_info *p) unsigned int vcpuid:16, domid:16; uint64_t cur_bg; int delta; + unsigned priority_level; + unsigned has_extratime; } __attribute__((packed)) *r = (typeof(r))ri->d; printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", " - "delta = %d\n", ri->dump_header, r->domid, - r->vcpuid, r->cur_bg, r->delta); + "delta = %d, priority_level = %d, has_extratime = %d\n", + ri->dump_header, r->domid, + r->vcpuid, r->cur_bg, r->delta, + r->priority_level, !!r->has_extratime); } break; case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */ if(opt.dump_all) { struct { unsigned int vcpuid:16, domid:16; + unsigned int priority_level; uint64_t cur_dl, cur_bg; } __attribute__((packed)) *r = (typeof(r))ri->d; - printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", " - "budget = %"PRIu64"\n", ri->dump_header, - r->domid, r->vcpuid, r->cur_dl, r->cur_bg); + printf(" %s rtds:repl_budget d%uv%u, priority_level = %u," + "deadline = %"PRIu64", budget = %"PRIu64"\n", + ri->dump_header, r->domid, r->vcpuid, + r->priority_level, r->cur_dl, r->cur_bg); } break; case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET */