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

2017-06-08 Thread George Dunlap
On 01/06/17 18:33, Dario Faggioli 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. You probably want to adjust the comment before the smp_rmb() that mentions tb_init_done as well. Other than that

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

2017-06-08 Thread George Dunlap
On 07/06/17 17:06, Jan Beulich wrote: On 07.06.17 at 17:55, wrote: >> On Wed, 2017-06-07 at 08:46 -0600, Jan Beulich wrote: >> On 01.06.17 at 19:33, wrote: In fact, when calling __trace_var() directly, we can assume that tb_init_done has been checked to be true, and t

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

2017-06-07 Thread Jan Beulich
>>> On 07.06.17 at 17:55, wrote: > On Wed, 2017-06-07 at 08:46 -0600, Jan Beulich wrote: >> > > > On 01.06.17 at 19:33, 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

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

2017-06-07 Thread Dario Faggioli
On Wed, 2017-06-07 at 08:46 -0600, Jan Beulich wrote: > > > > On 01.06.17 at 19:33, 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

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

2017-06-07 Thread Jan Beulich
>>> On 01.06.17 at 19:33, 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 p

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

2017-06-01 Thread Dario Faggioli
On Thu, 2017-06-01 at 18:53 +0100, Andrew Cooper wrote: > On 01/06/17 18:33, Dario Faggioli wrote: > > diff --git a/xen/common/trace.c b/xen/common/trace.c > > index 4fedc26..f29cd4c 100644 > > --- a/xen/common/trace.c > > +++ b/xen/common/trace.c > > @@ -691,7 +691,8 @@ void __trace_var(u32 event,

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

2017-06-01 Thread Andrew Cooper
On 01/06/17 18:33, Dario Faggioli 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. > > While there, also: > - still in __trace_var(), move the check that the event >is actually being traced up

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

2017-06-01 Thread Dario Faggioli
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. While there, also: - still in __trace_var(), move the check that the event is actually being traced up a little bit (to bail as soon as possible, if it i