[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3 of 3] xen: sched_credit: add some tracing
On Tue, 2012-12-04 at 19:10 +0000, George Dunlap wrote: > On 03/12/12 16:35, Dario Faggioli wrote: > > + /* Avoid TRACE_* to avoid a lot of useless !tb_init_done > > checks */ > > + for_each_cpu(cpu, &mask) > > + { > > + struct { > > + unsigned cpu:8; > > + } d; > > + d.cpu = cpu; > > + trace_var(TRC_CSCHED_TICKLE, 0, > > + sizeof(d), > > + (unsigned char*)&d); > > Why not just TRC_1D()? > As I tried to explain in the comment, I just wanted to avoid checking for !tb_init_done more than once, as this happens within a loop and, at least potentially, there may be more CPUs to tickle (and thus more calls to TRACE_1D). I take this comment of yours as you not thinking that is something worthwhile, right? If so, I can definitely turn this into a "standard" TRACE_1D() call. > The tracing infrastructure can only set the size > at a granularity of 32-bit words anyway, and at this point cpu is > "unsigned int", which will be a single word. > I know that. I just followed suit from sched_credit2.c, but I agree it's quite pointless for just one single field. Even if we decide to leave the direct call to trace_var, I'll kill the dummy struct. > Other than that, everything looks good. > Ok, thanks. :-) Dario -- <<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/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 |