diff options
| author | Jiri Olsa <[email protected]> | 2019-10-07 12:53:30 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-10-10 15:52:41 +0000 |
| commit | 285aaeac8c5d537b56b70169e21ac29ae5caa8e1 (patch) | |
| tree | 575d94a0ff5dbe0be84cf4d8e4475d26e4c74f3f /tools/perf/util/annotate.c | |
| parent | perf evlist: Switch to libperf's mmap interface (diff) | |
| download | kernel-285aaeac8c5d537b56b70169e21ac29ae5caa8e1.tar.gz kernel-285aaeac8c5d537b56b70169e21ac29ae5caa8e1.zip | |
libperf: Centralize map refcnt setting
Currently when a new map is mmapped we set its refcnt to 2 in the
perf_evlist_mmap_ops::mmap callback.
Every mmap gets its refcnt set to 2 when it's first mmaped:
- 1 for the current user, which will be taken out by a call to
perf_evlist__munmap_filtered(), where we find out there's
no more data comming from kernel to this mmap.
- 1 for the drain code where in perf_mmap__consume() the mmap
is released if it is empty.
Move this common setup into libperf's generic code before the mmap
callback is called.
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Michael Petlan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
0 files changed, 0 insertions, 0 deletions
