[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 15/16] xenalyze: handle RTDS scheduler events
On Thu, 2016-02-18 at 15:28 +0000, George Dunlap wrote: > On 16/02/16 18:13, Dario Faggioli wrote: > > --- > > Âtools/xentrace/xenalyze.c |ÂÂÂ59 > > +++++++++++++++++++++++++++++++++++++++++++++ > > Â1 file changed, 59 insertions(+) > > > > diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c > > index 8f97f3a..dd21229 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; > > Why are you doing this, instead of just using uint64_t? > It was to make the struct in sched_rt.c and here exactly match, for ease of someone reading both the pieces of code at the same time, to understand what's being printed. However, yes, using uint64_t is probably equally understandable, and more readable in case one only look at this code, so I can change this (and resend). Regards, Dario --Â <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |