[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200913210313.1985612-19-jolsa@kernel.org>
Date: Sun, 13 Sep 2020 23:03:05 +0200
From: Jiri Olsa <jolsa@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
Song Liu <songliubraving@...com>,
"Frank Ch. Eigler" <fche@...hat.com>,
Ian Rogers <irogers@...gle.com>,
Stephane Eranian <eranian@...gle.com>,
Alexey Budankov <alexey.budankov@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>
Subject: [PATCH 18/26] perf tests: Add mmap3 support for perf record test
Adding mmap3 support for perf record test so it can
pass for kernel with mmap3 support.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
tools/perf/tests/perf-record.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index 67d3f5aad016..722c0cc02e57 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -224,6 +224,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
if ((type == PERF_RECORD_COMM ||
type == PERF_RECORD_MMAP ||
type == PERF_RECORD_MMAP2 ||
+ type == PERF_RECORD_MMAP3 ||
type == PERF_RECORD_FORK ||
type == PERF_RECORD_EXIT) &&
(pid_t)event->comm.pid != evlist->workload.pid) {
@@ -233,7 +234,8 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
if ((type == PERF_RECORD_COMM ||
type == PERF_RECORD_MMAP ||
- type == PERF_RECORD_MMAP2) &&
+ type == PERF_RECORD_MMAP2 ||
+ type == PERF_RECORD_MMAP3) &&
event->comm.pid != event->comm.tid) {
pr_debug("%s with different pid/tid!\n", name);
++errs;
@@ -253,6 +255,9 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
goto check_bname;
case PERF_RECORD_MMAP2:
mmap_filename = event->mmap2.filename;
+ goto check_bname;
+ case PERF_RECORD_MMAP3:
+ mmap_filename = event->mmap3.filename;
check_bname:
bname = strrchr(mmap_filename, '/');
if (bname != NULL) {
--
2.26.2
Powered by blists - more mailing lists