mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [for-next][PATCH] tracing: Apply trace_clock changes to instance max buffer
@ 2017-09-07 12:46 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2017-09-07 12:46 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Andrew Morton, Baohong Liu

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: 170b3b1050e28d1ba0700e262f0899ffa4fccc52


Baohong Liu (1):
      tracing: Apply trace_clock changes to instance max buffer

----
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit 170b3b1050e28d1ba0700e262f0899ffa4fccc52
Author: Baohong Liu <baohong.liu@intel.com>
Date:   Tue Sep 5 16:57:19 2017 -0500

    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: stable@vger.kernel.org
    Fixes: 277ba0446 ("tracing: Add interface to allow multiple trace buffers")
    Signed-off-by: Baohong Liu <baohong.liu@intel.com>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 78842557eea0..5360b7aec57a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6229,7 +6229,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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-07 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07 12:46 [for-next][PATCH] tracing: Apply trace_clock changes to instance max buffer Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®