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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
353120b48d
commit
e440979faf
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user