diff options
author | 2019-07-27 22:31:17 +0200 | |
---|---|---|
committer | 2019-09-25 09:51:45 -0300 | |
commit | 2cf07b294a604aecd6b583e60724eaa1607f0fbc (patch) | |
tree | a77fa32ad8df14ae89c139ea2b3fd54d0d353fc9 /tools/perf/util/mmap.c | |
parent | libperf: Add 'mask' to struct perf_mmap (diff) | |
download | linux-2cf07b294a604aecd6b583e60724eaa1607f0fbc.tar.gz linux-2cf07b294a604aecd6b583e60724eaa1607f0fbc.tar.bz2 linux-2cf07b294a604aecd6b583e60724eaa1607f0fbc.zip |
libperf: Add 'fd' to struct perf_mmap
Move 'fd' from tools/perf's mmap to libperf's perf_mmap struct.
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 <a.p.zijlstra@chello.nl>
Link: http://lore.kernel.org/lkml/20190913132355.21634-13-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 702e8e0b90ea..40bf124cb658 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -320,7 +320,7 @@ void perf_mmap__munmap(struct mmap *map) if (map->core.base != NULL) { munmap(map->core.base, perf_mmap__mmap_len(map)); map->core.base = NULL; - map->fd = -1; + map->core.fd = -1; refcount_set(&map->refcnt, 0); } auxtrace_mmap__munmap(&map->auxtrace_mmap); @@ -378,7 +378,7 @@ int perf_mmap__mmap(struct mmap *map, struct mmap_params *mp, int fd, int cpu) map->core.base = NULL; return -1; } - map->fd = fd; + map->core.fd = fd; map->cpu = cpu; perf_mmap__setup_affinity_mask(map, mp); |