Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-26 Thread Wang Nan
Hi all, I posted a new series of patches for this problem. I open another thread to avoid disorder this thread. Please see: https://lkml.org/lkml/2015/1/26/198 Thank you. On 2015/1/25 0:39, Jiri Olsa wrote: > On Fri, Jan 23, 2015 at 05:40:02PM -0500, Jérémie Galarneau wrote: > > SNIP > >>> b

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-24 Thread Jiri Olsa
On Fri, Jan 23, 2015 at 05:40:02PM -0500, Jérémie Galarneau wrote: SNIP > > bt_ctf_clock_create() with the checked name and then free it. However, it > > is hacky > > and I think you won't like it. > > The prospect of seeing that code has convinced me to introduce > int bt_ctf_validate_identifi

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-23 Thread Jérémie Galarneau
On Thu, Jan 22, 2015 at 8:57 PM, Wang Nan wrote: > On 2015/1/22 21:27, Jiri Olsa wrote: >> On Thu, Jan 22, 2015 at 01:36:43PM +0800, Wang Nan wrote: >>> (If Steven Rostedt accept the previous patch which introduce a priv >>> field to 'struct format_field', we can use a relative simple method >>>

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-23 Thread Jiri Olsa
On Fri, Jan 23, 2015 at 09:57:53AM +0800, Wang Nan wrote: > On 2015/1/22 21:27, Jiri Olsa wrote: > > On Thu, Jan 22, 2015 at 01:36:43PM +0800, Wang Nan wrote: > >> (If Steven Rostedt accept the previous patch which introduce a priv > >> field to 'struct format_field', we can use a relative simple

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-23 Thread Jiri Olsa
On Fri, Jan 23, 2015 at 10:53:07AM +0800, Wang Nan wrote: SNIP > >> SNIP > >> > >>> > >>> +/* If dup < 0, add a prefix. Else, add _dupl_X suffix. */ > >>> +static char *change_name(char *name, char *orig_name, int dup) > >>> +{ > >>> + char *new_name = NULL; > >>> + size_t len; > >>> + > >>> +

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-22 Thread Wang Nan
On 2015/1/23 9:57, Wang Nan wrote: > On 2015/1/22 21:27, Jiri Olsa wrote: >> On Thu, Jan 22, 2015 at 01:36:43PM +0800, Wang Nan wrote: >>> (If Steven Rostedt accept the previous patch which introduce a priv >>> field to 'struct format_field', we can use a relative simple method >>> for name conve

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-22 Thread Wang Nan
On 2015/1/22 21:27, Jiri Olsa wrote: > On Thu, Jan 22, 2015 at 01:36:43PM +0800, Wang Nan wrote: >> (If Steven Rostedt accept the previous patch which introduce a priv >> field to 'struct format_field', we can use a relative simple method >> for name conversion. If not , perf must track name conv

Re: [PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-22 Thread Jiri Olsa
On Thu, Jan 22, 2015 at 01:36:43PM +0800, Wang Nan wrote: > (If Steven Rostedt accept the previous patch which introduce a priv > field to 'struct format_field', we can use a relative simple method > for name conversion. If not , perf must track name conversion by > itself.) > > Some parameters

[PATCH RFC 2/2] perf: convert: fix duplicate field names and avoid reserved keywords.

2015-01-21 Thread Wang Nan
(If Steven Rostedt accept the previous patch which introduce a priv field to 'struct format_field', we can use a relative simple method for name conversion. If not , perf must track name conversion by itself.) Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with