Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751971AbbHEMww (ORCPT ); Wed, 5 Aug 2015 08:52:52 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:37494 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751239AbbHEMwu (ORCPT ); Wed, 5 Aug 2015 08:52:50 -0400 MIME-Version: 1.0 In-Reply-To: <1437536763-10827-4-git-send-email-zhang.chunyan@linaro.org> References: <1437536763-10827-1-git-send-email-zhang.chunyan@linaro.org> <1437536763-10827-4-git-send-email-zhang.chunyan@linaro.org> Date: Wed, 5 Aug 2015 20:52:49 +0800 Message-ID: Subject: Re: [PATCH v4 3/3] trace: Add an output of trace event logs to STM From: Chunyan Zhang To: Steven Rostedt , mingo@kernel.org Cc: Mathieu Poirier , Serge Broslavsky , Mark Brown , Alexander Shishkin , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2488 Lines: 65 Hello Steve, May I have your further comments/suggestions on this version of patchset? I know you were just back from a vacation, and must be very busy recently, but after you finished the most urgent matters, could you please leave us a little bandwidth to think about how you want these patches to be improved. Like I said in the former emails, if you don't have enough time to do all the modifications, I hope I can more or less help with something. But I really need your guidance. Thank you so much, Chunyan On Wed, Jul 22, 2015 at 11:46 AM, Chunyan Zhang wrote: > When the trace event happens, the traces would be committed to ring buffer. > This patch will add an output of the traces to an STM at this moment, > of course the precondition is TRACE_EVENT_STM be configured. > > Signed-off-by: Chunyan Zhang > --- > kernel/trace/trace_events.c | 2 ++ > kernel/trace/trace_output.h | 7 +++++++ > 2 files changed, 9 insertions(+) > > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c > index 404a372..35fd171 100644 > --- a/kernel/trace/trace_events.c > +++ b/kernel/trace/trace_events.c > @@ -249,6 +249,8 @@ void trace_event_buffer_commit(struct trace_event_buffer *fbuffer) > event_trigger_unlock_commit(fbuffer->trace_file, fbuffer->buffer, > fbuffer->event, fbuffer->entry, > fbuffer->flags, fbuffer->pc); > + > + trace_event_stm_log(fbuffer); > } > EXPORT_SYMBOL_GPL(trace_event_buffer_commit); > > diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h > index 4cbfe85..28e25e9 100644 > --- a/kernel/trace/trace_output.h > +++ b/kernel/trace/trace_output.h > @@ -41,5 +41,12 @@ extern struct rw_semaphore trace_event_sem; > #define SEQ_PUT_HEX_FIELD(s, x) \ > trace_seq_putmem_hex(s, &(x), sizeof(x)) > > +#ifdef CONFIG_TRACE_EVENT_STM > +extern void stm_trace_event_write(const char *buf, unsigned len); > +extern void trace_event_stm_log(struct trace_event_buffer *buffer); > +#else > +static inline void trace_event_stm_log(struct trace_event_buffer *buffer) {} > +#endif > + > #endif > > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/