[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 02/15] xen: tracing: avoid checking tb_init_done multiple times.



>>> On 01.06.17 at 19:33, <dario.faggioli@xxxxxxxxxx> wrote:
> In fact, when calling __trace_var() directly, we can
> assume that tb_init_done has been checked to be true,
> and the if is hence redundant.

The "assume" here worries me: What if there's a single place
somewhere that a grep can't easily find where no check is
present? Is it certain that ...

> @@ -691,7 +691,8 @@ void __trace_var(u32 event, bool_t cycles, unsigned int 
> extra,
>      unsigned int extra_word;
>      bool_t started_below_highwater;
>  
> -    if( !tb_init_done )
> +    /* If the event is not interesting, bail, as early as possible */
> +    if ( (tb_event_mask & event) == 0 )
>          return;

... this check would always be false then (i.e. tb_event_mask is
always zero) in that case?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.