perf session: Move unmap code to reader__mmap
authorAlexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Wed, 13 Oct 2021 09:06:39 +0000 (12:06 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 25 Oct 2021 16:47:41 +0000 (13:47 -0300)
commitde096489d00f7764934906d0b6688783be6b9dc0
tree7d3e94de892270a06381014cd17258ea14ceda8b
parent06763e7b30d9b502c48ad982851a195781aeff81
perf session: Move unmap code to reader__mmap

Move the unmapping code to reader__mmap(), so that the mmap code is
located together.

Move the head/file_offset computation to reader__mmap(), so all the
offset computation is located together and in one place only.

Suggested-by: Jiri Olsa <jolsa@kernel.org>
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Reviewed-by: Riccardo Mancini <rickyman7@gmail.com>
Signed-off-by: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
Tested-by: Riccardo Mancini <rickyman7@gmail.com>
Acked-by: Namhyung Kim <namhyung@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Antonov <alexander.antonov@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Budankov <abudankov@huawei.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/f1c5e17cfa1ecfe912d10b411be203b55d148bc7.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c