diff options
author | 2019-10-07 14:53:10 +0200 | |
---|---|---|
committer | 2019-10-10 09:40:00 -0300 | |
commit | e440979faf6ac8048e1792af383df6af78dd1cb0 (patch) | |
tree | de71687f93ffcca4115986d57b9d9dc78409b8ab /tools/perf/util/mmap.c | |
parent | libperf: Add perf_mmap__init() function (diff) | |
download | linux-e440979faf6ac8048e1792af383df6af78dd1cb0.tar.gz linux-e440979faf6ac8048e1792af383df6af78dd1cb0.tar.bz2 linux-e440979faf6ac8048e1792af383df6af78dd1cb0.zip |
libperf: Add 'struct perf_mmap_param'
Add libperf's version of mmap params 'struct perf_mmap_param' object
with the basics: 'prot' and 'mask'. Encapsulate it in the current
'struct mmap_params' object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20191007125344.14268-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/mmap.c')
-rw-r--r-- | tools/perf/util/mmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index a35dc57d5995..a496ced5ed2a 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -370,8 +370,8 @@ int perf_mmap__mmap(struct mmap *map, struct mmap_params *mp, int fd, int cpu) */ refcount_set(&map->core.refcnt, 2); map->core.prev = 0; - map->core.mask = mp->mask; - map->core.base = mmap(NULL, perf_mmap__mmap_len(map), mp->prot, + map->core.mask = mp->core.mask; + map->core.base = mmap(NULL, perf_mmap__mmap_len(map), mp->core.prot, MAP_SHARED, fd, 0); if (map->core.base == MAP_FAILED) { pr_debug2("failed to mmap perf event ring buffer, error %d\n", |