From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 14/14] xenalyze: handle RTDS scheduler events Date: Fri, 05 Feb 2016 19:35:59 +0100 Message-ID: <20160205183559.4543.27301.stgit@Solace.station> References: <20160205183137.4543.56523.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRlEo-0004tt-PW for xen-devel@lists.xenproject.org; Fri, 05 Feb 2016 18:36:10 +0000 Received: by mail-wm0-f66.google.com with SMTP id r129so4195793wmr.0 for ; Fri, 05 Feb 2016 10:36:09 -0800 (PST) In-Reply-To: <20160205183137.4543.56523.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Olaf Hering , Wei Liu , Ian Campbell , George Dunlap , Tianyang Chen , Ian Jackson , Meng Xu List-Id: xen-devel@lists.xenproject.org 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: Meng Xu Cc: Tianyang Chen Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu Cc: Olaf Hering --- tools/xentrace/xenalyze.c | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 00dbf7c..103e8b2 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7828,6 +7828,65 @@ void sched_process(struct pcpu_info *p) r->rq_avgload, r->b_avgload); } break; + /* RTDS (TRC_RTDS_xxx) */ + case TRC_SCHED_CLASS_EVT(RTDS, 1): /* TICKLE */ + if(opt.dump_all) { + struct { + unsigned int cpu:16; + } * r = (typeof(r))ri->d; + + printf(" %s rtds:runq_tickle cpu %u\n", + ri->dump_header, r->cpu); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 2): /* RUNQ_PICK */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int cur_dl_lo, cur_dl_hi; + unsigned int cur_bg_lo, cur_bg_hi; + } * r = (typeof(r))ri->d; + uint64_t dl = (((uint64_t)r->cur_dl_hi) << 32) + r->cur_dl_lo; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:runq_pick d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, dl, bg); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 3): /* BUDGET_BURN */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int cur_bg_lo, cur_bg_hi; + int delta; + } * r = (typeof(r))ri->d; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", " + "delta = %d\n", ri->dump_header, r->domid, + r->vcpuid, bg, r->delta); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */ + if(opt.dump_all) { + struct { + unsigned int vcpuid:16, domid:16; + unsigned int cur_dl_lo, cur_dl_hi; + unsigned int cur_bg_lo, cur_bg_hi; + } * r = (typeof(r))ri->d; + uint64_t dl = (((uint64_t)r->cur_dl_hi) << 32) + r->cur_dl_lo; + uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + r->cur_bg_lo; + + printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", " + "budget = %"PRIu64"\n", ri->dump_header, + r->domid, r->vcpuid, dl, bg); + } + break; + case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET */ + if(opt.dump_all) + printf(" %s rtds:sched_tasklet\n", ri->dump_header); + break; default: process_generic(ri); }