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

2015-01-23 Thread Mathieu Desnoyers
- Original Message - > From: "Jérémie Galarneau" > To: "Wang Nan" > Cc: "Jiri Olsa" , "Sebastian Andrzej Siewior" > , "Li Zefan" > , linux-kernel@vger.kernel.org, "Mathieu Desnoyers" > > Sent: Wedn

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

2015-01-23 Thread Mathieu Desnoyers
...@efficios.com Sent: Wednesday, January 21, 2015 10:14:16 PM Subject: Re: [PATCH 1/2] perf: convert: fix duplicate field names and avoid reserved keywords. On Wed, Jan 21, 2015 at 8:38 PM, Wang Nan wangn...@huawei.com wrote: On 2015/1/21 23:56, Jérémie Galarneau wrote: On Wed, Jan 21

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

2015-01-21 Thread Wang Nan
On 2015/1/22 11:14, Jérémie Galarneau wrote: > On Wed, Jan 21, 2015 at 8:38 PM, Wang Nan wrote: >> On 2015/1/21 23:56, Jérémie Galarneau wrote: >>> On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa wrote: On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: > Some parameters of syscall

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

2015-01-21 Thread Jérémie Galarneau
On Wed, Jan 21, 2015 at 8:38 PM, Wang Nan wrote: > On 2015/1/21 23:56, Jérémie Galarneau wrote: >> On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa wrote: >>> On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some parameters of syscall tracepoints named as 'nr', 'event', etc. When

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

2015-01-21 Thread Wang Nan
On 2015/1/21 23:56, Jérémie Galarneau wrote: > On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa wrote: >> On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: >>> Some parameters of syscall tracepoints named as 'nr', 'event', etc. >>> When dealing with them, perf convert to ctf meets some problem:

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

2015-01-21 Thread Jérémie Galarneau
On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa wrote: > On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: >> Some parameters of syscall tracepoints named as 'nr', 'event', etc. >> When dealing with them, perf convert to ctf meets some problem: >> >> 1. If a parameter with name 'nr', it will

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 09:25:45AM -0500, Steven Rostedt wrote: > On Wed, 21 Jan 2015 15:19:38 +0100 > Jiri Olsa wrote: > > > On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: > > > Hi Jiri, > > > > > > I found that only this patch is not enough. When converting such > > > tracepoints,

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

2015-01-21 Thread Steven Rostedt
On Wed, 21 Jan 2015 15:19:38 +0100 Jiri Olsa wrote: > On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: > > Hi Jiri, > > > > I found that only this patch is not enough. When converting such > > tracepoints, > > it uses add_tracepoint_fields_values(..., struct format_field *fields ...),

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: > Hi Jiri, > > I found that only this patch is not enough. When converting such tracepoints, > it uses add_tracepoint_fields_values(..., struct format_field *fields ...), > and fields->name is still the original one. > > If 'struct

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: > Some parameters of syscall tracepoints named as 'nr', 'event', etc. > When dealing with them, perf convert to ctf meets some problem: > > 1. If a parameter with name 'nr', it will duplicate syscall's > common field 'nr'. One such

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

2015-01-21 Thread Wang Nan
Hi Jiri, I found that only this patch is not enough. When converting such tracepoints, it uses add_tracepoint_fields_values(..., struct format_field *fields ...), and fields->name is still the original one. If 'struct format_field' has a field like 'dup_name' we can make things simpler. However,

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

2015-01-21 Thread Jérémie Galarneau
On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with them, perf convert to ctf meets some problem: 1. If a parameter with name 'nr',

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

2015-01-21 Thread Jérémie Galarneau
On Wed, Jan 21, 2015 at 8:38 PM, Wang Nan wangn...@huawei.com wrote: On 2015/1/21 23:56, Jérémie Galarneau wrote: On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some parameters of syscall tracepoints named as 'nr',

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

2015-01-21 Thread Wang Nan
On 2015/1/21 23:56, Jérémie Galarneau wrote: On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with them, perf convert to ctf meets some

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

2015-01-21 Thread Wang Nan
On 2015/1/22 11:14, Jérémie Galarneau wrote: On Wed, Jan 21, 2015 at 8:38 PM, Wang Nan wangn...@huawei.com wrote: On 2015/1/21 23:56, Jérémie Galarneau wrote: On Wed, Jan 21, 2015 at 9:11 AM, Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some

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

2015-01-21 Thread Wang Nan
Hi Jiri, I found that only this patch is not enough. When converting such tracepoints, it uses add_tracepoint_fields_values(..., struct format_field *fields ...), and fields-name is still the original one. If 'struct format_field' has a field like 'dup_name' we can make things simpler. However,

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

2015-01-21 Thread Steven Rostedt
On Wed, 21 Jan 2015 15:19:38 +0100 Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: Hi Jiri, I found that only this patch is not enough. When converting such tracepoints, it uses add_tracepoint_fields_values(..., struct format_field *fields

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 09:25:45AM -0500, Steven Rostedt wrote: On Wed, 21 Jan 2015 15:19:38 +0100 Jiri Olsa jo...@redhat.com wrote: On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: Hi Jiri, I found that only this patch is not enough. When converting such tracepoints,

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 11:23:54AM +0800, Wang Nan wrote: Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with them, perf convert to ctf meets some problem: 1. If a parameter with name 'nr', it will duplicate syscall's common field 'nr'. One such syscall

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

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 07:16:39PM +0800, Wang Nan wrote: Hi Jiri, I found that only this patch is not enough. When converting such tracepoints, it uses add_tracepoint_fields_values(..., struct format_field *fields ...), and fields-name is still the original one. If 'struct format_field'

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

2015-01-20 Thread Wang Nan
Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with them, perf convert to ctf meets some problem: 1. If a parameter with name 'nr', it will duplicate syscall's common field 'nr'. One such syscall is io_submit(). 2. If a parameter with name 'event', it is

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

2015-01-20 Thread Wang Nan
Some parameters of syscall tracepoints named as 'nr', 'event', etc. When dealing with them, perf convert to ctf meets some problem: 1. If a parameter with name 'nr', it will duplicate syscall's common field 'nr'. One such syscall is io_submit(). 2. If a parameter with name 'event', it is