libperf: Add perf_mmap__init() function

Add perf_mmap__init() function to initialize 'struct perf_mmap' objects.

Add it to a new mmap.c source file, that will carry all the mmap related
functions.

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-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jiri Olsa
2019-10-07 14:53:09 +02:00
committed by Arnaldo Carvalho de Melo
parent 26d5310ee2
commit 353120b48d
4 changed files with 14 additions and 3 deletions

View File

@@ -29,4 +29,6 @@ struct perf_mmap {
char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8);
};
void perf_mmap__init(struct perf_mmap *map, bool overwrite);
#endif /* __LIBPERF_INTERNAL_MMAP_H */