Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbdIGBQB convert rfc822-to-8bit (ORCPT ); Wed, 6 Sep 2017 21:16:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:19774 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbdIGBP7 (ORCPT ); Wed, 6 Sep 2017 21:15:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,356,1500966000"; d="scan'208";a="1192395259" From: "Liu, Baohong" To: Steven Rostedt , Tom Zanussi CC: "tglx@linutronix.de" , "mhiramat@kernel.org" , "namhyung@kernel.org" , "Patel, Vedang" , "bigeasy@linutronix.de" , "joel.opensrc@gmail.com" , "joelaf@google.com" , "mathieu.desnoyers@efficios.com" , "linux-kernel@vger.kernel.org" , "linux-rt-users@vger.kernel.org" Subject: RE: [PATCH v2 07/40] tracing: Apply absolute timestamps to instance max buffer Thread-Topic: [PATCH v2 07/40] tracing: Apply absolute timestamps to instance max buffer Thread-Index: AQHTJpDwM1HYBnieA0Gqv2mYi6IHVqKpDp0A//+RiCA= Date: Thu, 7 Sep 2017 01:15:58 +0000 Message-ID: <3CD19752AA18BE4A91FBEE9F90EBB89D70C135AB@ORSMSX106.amr.corp.intel.com> References: <20170906204946.61c4e680@gandalf.local.home> In-Reply-To: <20170906204946.61c4e680@gandalf.local.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.139] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2297 Lines: 67 On Wed, 6 Sep 2017 20:49:46 -0400 Steven Rostedt wrote: > On Tue, 5 Sep 2017 16:57:19 -0500 > Tom Zanussi wrote: > > > From: Baohong Liu > > > > 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. > > > > Signed-off-by: Baohong Liu > > --- > > 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 > > Please fold this part into the previous patch. I'm adding the first part to my tree > now and will start testing it tonight, and push it to Linus by the weekend. Will do. Thanks, Baohong > > -- Steve > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the > body of a message to majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html