lkml.org 
[lkml]   [2016]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events
From
Date


On 2016/5/25 13:03, Wang Nan wrote:
> Create an auxiliary evlist for overwritable events.
>
> Before mmap, build this evlist and set 'overwrite' and 'backward'
> attribute. Since perf_evlist__mmap_ex() only maps events when
> evsel->overwrite matches evlist's corresponding attributes, with
> these two evlists an event goes to either rec->evlist or
> rec->overwrite_evlist.
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: He Kuang <hekuang@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Zefan Li <lizefan@huawei.com>
> Cc: pi3orama@163.com
> ---
> tools/perf/builtin-record.c | 138 ++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 114 insertions(+), 24 deletions(-)
>

[SNIP]

> @@ -941,7 +1026,10 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
> err = 0;
> waking++;
>
> - if (perf_evlist__filter_pollfd(rec->evlist, POLLERR | POLLHUP) == 0)
> + active_evts = perf_evlist__filter_pollfd(rec->evlist, POLLERR | POLLHUP);
> + active_evts += perf_evlist__filter_pollfd(rec->overwrite_evlist, POLLERR | POLLHUP);

Sorry, before calling filter here should check if rec->overwrite_evlist
is not NULL.
I'll resend this patch with this problem fixed soon.

\
 
 \ /
  Last update: 2016-05-25 12:21    [W:0.084 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site