Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Wangnan (F)
On 2016/7/13 22:06, Jiri Olsa wrote: On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx) +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool overwrite) { - struct

Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Wangnan (F)
On 2016/7/13 22:06, Jiri Olsa wrote: On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx) +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool overwrite) { - struct

Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Jiri Olsa
On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP > -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, > int idx) > +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool > overwrite) > { > - struct perf_mmap *md = >mmap[idx]; >

Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Jiri Olsa
On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP > -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, > int idx) > +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool > overwrite) > { > - struct perf_mmap *md = >mmap[idx]; >

[PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-12 Thread Wang Nan
Currently, evlist mmap related helpers and APIs accept evlist and idx, and dereference 'struct perf_mmap' by evlist->mmap[idx]. This is unnecessary, and force a evlist contain only one mmap array. Following commits are going to introduce multiple mmap array to evlist. This patch refators those

[PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-12 Thread Wang Nan
Currently, evlist mmap related helpers and APIs accept evlist and idx, and dereference 'struct perf_mmap' by evlist->mmap[idx]. This is unnecessary, and force a evlist contain only one mmap array. Following commits are going to introduce multiple mmap array to evlist. This patch refators those