Message ID | 20171113013809.212417-3-wangnan0@huawei.com |
---|---|
State | Accepted |
Commit | d492326f160e44e08fcf132a63163b36dd8e8839 |
Headers | show |
Series | perf tools: Clarify overwrite and backward, bugfix | expand |
Em Mon, Nov 13, 2017 at 01:38:04AM +0000, Wang Nan escreveu: > Setting overwrite in perf_evlist__mmap() is meaningless because the > event in this evlist is already have 'overwrite' postfix and goes to > backward ring buffer automatically. Pass 'false' to perf_evlist__mmap() > to make it similar to others. applied > Signed-off-by: Wang Nan <wangnan0@huawei.com> > --- > tools/perf/tests/backward-ring-buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c > index d233ad3..992c917 100644 > --- a/tools/perf/tests/backward-ring-buffer.c > +++ b/tools/perf/tests/backward-ring-buffer.c > @@ -58,7 +58,7 @@ static int do_test(struct perf_evlist *evlist, int mmap_pages, > int err; > char sbuf[STRERR_BUFSIZE]; > > - err = perf_evlist__mmap(evlist, mmap_pages, true); > + err = perf_evlist__mmap(evlist, mmap_pages, false); > if (err < 0) { > pr_debug("perf_evlist__mmap: %s\n", > str_error_r(errno, sbuf, sizeof(sbuf))); > -- > 2.10.1
diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index d233ad3..992c917 100644 --- a/tools/perf/tests/backward-ring-buffer.c +++ b/tools/perf/tests/backward-ring-buffer.c @@ -58,7 +58,7 @@ static int do_test(struct perf_evlist *evlist, int mmap_pages, int err; char sbuf[STRERR_BUFSIZE]; - err = perf_evlist__mmap(evlist, mmap_pages, true); + err = perf_evlist__mmap(evlist, mmap_pages, false); if (err < 0) { pr_debug("perf_evlist__mmap: %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
Setting overwrite in perf_evlist__mmap() is meaningless because the event in this evlist is already have 'overwrite' postfix and goes to backward ring buffer automatically. Pass 'false' to perf_evlist__mmap() to make it similar to others. Signed-off-by: Wang Nan <wangnan0@huawei.com> --- tools/perf/tests/backward-ring-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.10.1