From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: Re: [PATCH 11/18] tracing: Add symbol type to function based events Date: Thu, 8 Feb 2018 10:48:40 -0500 Message-ID: <20180208104840.6c9667b7@gandalf.local.home> References: <20180202230458.840252014@goodmis.org> <20180202231018.653298332@goodmis.org> <20180208110341.GC26290@sejong> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Masami Hiramatsu , Tom Zanussi , linux-rt-users@vger.kernel.org, linux-trace-users@vger.kernel.org, Arnaldo Carvalho de Melo , Clark Williams , Jiri Olsa , Daniel Bristot de Oliveira , Juri Lelli , Jonathan Corbet , Mathieu Desnoyers , Alexei Starovoitov , kernel-team@lge.com To: Namhyung Kim Return-path: Received: from mail.kernel.org ([198.145.29.99]:60962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbeBHPso (ORCPT ); Thu, 8 Feb 2018 10:48:44 -0500 In-Reply-To: <20180208110341.GC26290@sejong> Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Thu, 8 Feb 2018 20:03:41 +0900 Namhyung Kim wrote: > > @@ -76,6 +76,7 @@ typedef u64 x64; > > typedef u32 x32; > > typedef u16 x16; > > typedef u8 x8; > > +typedef void * symbol; > > > > #define TYPE_TUPLE(type) \ > > { #type, sizeof(type), is_signed_type(type) } > > @@ -97,7 +98,8 @@ typedef u8 x8; > > TYPE_TUPLE(x16), \ > > TYPE_TUPLE(u8), \ > > TYPE_TUPLE(s8), \ > > - TYPE_TUPLE(x8) > > + TYPE_TUPLE(x8), \ > > + TYPE_TUPLE(symbol) > > > > static struct func_type { > > char *name; > > @@ -262,7 +264,7 @@ process_event(struct func_event *fevent, const char *token, enum func_states sta > > switch (state) { > > case FUNC_STATE_INIT: > > unsign = 0; > > - if (!isalpha(token[0])) > > + if (!isalpha(token[0]) && token[0] != '_') > > break; > > Hmm.. it seems that it needs to be moved to the patch 1? Agreed. > > > > /* Do not allow wild cards */ > > if (strstr(token, "*") || strstr(token, "?")) > > @@ -305,7 +307,7 @@ process_event(struct func_event *fevent, const char *token, enum func_states sta > > return FUNC_STATE_TYPE; > > > > case FUNC_STATE_TYPE: > > - if (!isalpha(token[0])) > > + if (!isalpha(token[0]) || token[0] == '_') > > break; > > Why is different that the above? Anyway, '_' is not an alphabet.. That's a bug. I thought I fixed that. Ah, in v2 I fixed it in a later patch. I'll restructure to fix it in the proper place. Thanks! -- Steve