lkml.org 
[lkml]   [2018]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/18] tracing: Add symbol type to function based events
On Thu, 8 Feb 2018 20:03:41 +0900
Namhyung Kim <namhyung@kernel.org> 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

\
 
 \ /
  Last update: 2018-02-08 16:50    [W:0.074 / U:14.464 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site