[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 12/15] xen: trace tasklets
On Fri, 2017-06-09 at 04:59 -0600, Jan Beulich wrote: > > > > On 01.06.17 at 19:35, <dario.faggioli@xxxxxxxxxx> wrote: > > --- a/xen/common/tasklet.c > > +++ b/xen/common/tasklet.c > > @@ -30,10 +30,87 @@ static DEFINE_PER_CPU(struct list_head, > > [...] > > +#else > > > > +#define trace_enqueue(t) do {} while ( 0 ) > > +#define trace_schedule(t) do {} while ( 0 ) > > +#define trace_work(t) do {} while ( 0 ) > > +#define trace_kill(t) do {} while ( 0 ) > > +#define trace_migrate() do {} while ( 0 ) > > +#define trace_init(t) do {} while ( 0 ) > > +#endif /* TRACE_TASKLETS */ > > Seeing how such additions add up, I think I'd prefer if you put them > into header files instead of cluttering source files this way. You > could have one such header per traceable component. > Right, good point. As a matter of fact, the components dealt with in this series, have their own header already, such as: xen/include/xen/rcupdate.h xen/include/xen/timer.h xen/include/xen/softirq.h xen/include/xen/tasklet.h I guess I can put these there? > > @@ -178,6 +258,11 @@ static void migrate_tasklets_from_cpu(unsigned > > int cpu, struct list_head *list) > > > > spin_lock_irqsave(&tasklet_lock, flags); > > > > + if ( list_empty(list) ) > > + goto out; > > + > > + trace_migrate(); > > + > > while ( !list_empty(list) ) > > Two alternatives: > > if ( !list_empty(list) ) > trace_migrate(); > > (avoiding the goto) or > > if ( list_empty(list) ) > goto out; > > trace_migrate(); > > do { > ... > } while ( !list_empty(list) ); > > (avoiding the redundant check). > Sure. Thanks and 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 https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |