Skip to content

Commit 170b3b1

Browse files
bliu11-intelrostedt
authored andcommitted
tracing: Apply trace_clock changes to instance max buffer
Currently trace_clock timestamps are applied to both regular and max buffers only for global trace. For instance trace, trace_clock 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 trace_clock timestamps to instance max buffer as well. Link: http://lkml.kernel.org/r/ebdb168d0be042dcdf51f81e696b17fabe3609c1.1504642143.git.tom.zanussi@linux.intel.com Cc: [email protected] Fixes: 277ba04 ("tracing: Add interface to allow multiple trace buffers") Signed-off-by: Baohong Liu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 7685ab6 commit 170b3b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6229,7 +6229,7 @@ static int tracing_set_clock(struct trace_array *tr, const char *clockstr)
62296229
tracing_reset_online_cpus(&tr->trace_buffer);
62306230

62316231
#ifdef CONFIG_TRACER_MAX_TRACE
6232-
if (tr->flags & TRACE_ARRAY_FL_GLOBAL && tr->max_buffer.buffer)
6232+
if (tr->max_buffer.buffer)
62336233
ring_buffer_set_clock(tr->max_buffer.buffer, trace_clocks[i].func);
62346234
tracing_reset_online_cpus(&tr->max_buffer);
62356235
#endif

0 commit comments

Comments
 (0)