Re: [PATCH v2 07/40] tracing: Apply absolute timestamps to instance max buffer

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

 



On Tue,  5 Sep 2017 16:57:19 -0500
Tom Zanussi <tom.zanussi@xxxxxxxxxxxxxxx> wrote:

> From: Baohong Liu <baohong.liu@xxxxxxxxx>
> 
> Currently absolute timestamps are applied to both regular and max
> buffers only for global trace. For instance trace, absolute
> timestamps are applied only to regular buffer. But, regular and max
> buffers can be swapped, for example, following a snapshot. So, for
> instance trace, bad timestamps can be seen following a snapshot.
> Let's apply absolute timestamps to instance max buffer as well.
> 
> Similarly, buffer clock change is applied to instance max buffer
> as well.

Hmm, this is a bug fix in its own right. I'll pull this in for the
current merge window and slap a stable tag on it too.

-- Steve

> 
> Signed-off-by: Baohong Liu <baohong.liu@xxxxxxxxx>
> ---
>  kernel/trace/trace.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 66d465e..719e4c1 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6223,7 +6223,7 @@ static int tracing_set_clock(struct trace_array *tr, const char *clockstr)
>  	tracing_reset_online_cpus(&tr->trace_buffer);
>  
>  #ifdef CONFIG_TRACER_MAX_TRACE
> -	if (tr->flags & TRACE_ARRAY_FL_GLOBAL && tr->max_buffer.buffer)
> +	if (tr->max_buffer.buffer)
>  		ring_buffer_set_clock(tr->max_buffer.buffer, trace_clocks[i].func);
>  	tracing_reset_online_cpus(&tr->max_buffer);
>  #endif
> @@ -6307,7 +6307,7 @@ int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs)
>  	tracing_reset_online_cpus(&tr->trace_buffer);
>  
>  #ifdef CONFIG_TRACER_MAX_TRACE
> -	if (tr->flags & TRACE_ARRAY_FL_GLOBAL && tr->max_buffer.buffer)
> +	if (tr->max_buffer.buffer)
>  		ring_buffer_set_time_stamp_abs(tr->max_buffer.buffer, abs);
>  	tracing_reset_online_cpus(&tr->max_buffer);
>  #endif

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux