From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753586AbbDCBlk (ORCPT ); Thu, 2 Apr 2015 21:41:40 -0400 Received: from mail.kernel.org ([198.145.29.136]:39923 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378AbbDCBl1 (ORCPT ); Thu, 2 Apr 2015 21:41:27 -0400 Message-Id: <20150403014123.852999555@goodmis.org> User-Agent: quilt/0.61-1 Date: Thu, 02 Apr 2015 21:38:08 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Arnaldo Carvalho de Melo , Namhyung Kim , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 06/18 v3] tracing: Update trace-event-sample with TRACE_SYSTEM_VAR documentation References: <20150403013802.220157513@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=0006-tracing-Update-trace-event-sample-with-TRACE_SYSTEM_.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Steven Rostedt (Red Hat)" Add documentation about TRACE_SYSTEM needing to be alpha-numeric or with underscores, and that if it is not, then the use of TRACE_SYSTEM_VAR is required to make something that is. An example of this is shown in samples/trace_events/trace-events-sample.h Signed-off-by: Steven Rostedt --- samples/trace_events/trace-events-sample.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index a2c8b02b6359..19405f18cc8a 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h @@ -22,7 +22,25 @@ * protection, just like TRACE_INCLUDE_FILE. */ #undef TRACE_SYSTEM -#define TRACE_SYSTEM sample +#define TRACE_SYSTEM sample-trace + +/* + * TRACE_SYSTEM is expected to be a C valid variable (alpha-numeric + * and underscore), although it may start with numbers. If for some + * reason it is not, you need to add the following lines: + */ +#undef TRACE_SYSTEM_VAR +#define TRACE_SYSTEM_VAR sample_trace +/* + * But the above is only needed if TRACE_SYSTEM is not alpha-numeric + * and underscored. By default, TRACE_SYSTEM_VAR will be equal to + * TRACE_SYSTEM. As TRACE_SYSTEM_VAR must be alpha-numeric, if + * TRACE_SYSTEM is not, then TRACE_SYSTEM_VAR must be defined with + * only alpha-numeric and underscores. + * + * The TRACE_SYSTEM_VAR is only used internally and not visible to + * user space. + */ /* * Notice that this file is not protected like a normal header. -- 2.1.4