From: "Wangnan (F)" <wangnan0@huawei.com>
To: <acme@kernel.org>
Cc: <pi3orama@163.com>, <linux-kernel@vger.kernel.org>,
He Kuang <hekuang@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Jiri Olsa <jolsa@kernel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>, Zefan Li <lizefan@huawei.com>
Subject: Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events
Date: Wed, 25 May 2016 18:16:07 +0800 [thread overview]
Message-ID: <57457B67.1040501@huawei.com> (raw)
In-Reply-To: <1464152623-171824-5-git-send-email-wangnan0@huawei.com>
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.
next prev parent reply other threads:[~2016-05-25 10:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 5:03 [PATCH v5 0/8] perf tools: Support overwritable ring buffer Wang Nan
2016-05-25 5:03 ` [PATCH v5 1/8] perf tools: Check 'base' pointer before checking refcnt when put a mmap Wang Nan
2016-05-25 5:03 ` [PATCH v5 2/8] perf tools: Choose correct reading direction according to evlist->backward Wang Nan
2016-05-25 5:03 ` [PATCH v5 3/8] perf tests: Add testcase for auxiliary evlist Wang Nan
2016-05-25 5:03 ` [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan
2016-05-25 10:16 ` Wangnan (F) [this message]
2016-05-25 13:47 ` Wangnan (F)
2016-05-25 14:18 ` Arnaldo Carvalho de Melo
2016-05-25 5:03 ` [PATCH v5 5/8] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-25 5:03 ` [PATCH v5 6/8] perf tools: Enable overwrite settings Wang Nan
2016-05-25 5:03 ` [PATCH v5 7/8] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-05-25 5:03 ` [PATCH v5 8/8] perf tools: Check write_backward during evlist config Wang Nan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57457B67.1040501@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.