[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190913132355.21634-48-jolsa@kernel.org>
Date: Fri, 13 Sep 2019 15:23:29 +0200
From: Jiri Olsa <jolsa@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Michael Petlan <mpetlan@...hat.com>
Subject: [PATCH 47/73] perf tools: Use perf_mmap way to detect aux mmap
We will move this code into libperf shortly, so we
need to free it of 'struct auxtrace_mmap' usage,
because it won't be available in libperf (for now).
The perf_event_mmap_page::aux_size is set when the
aux mmap is mapped, so the check is equivalent.
Link: http://lkml.kernel.org/n/tip-nmj5fchj8wdglxj7d1voxj66@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
tools/perf/util/mmap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
index b904a7a57fdf..4b1d1ae79042 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -106,7 +106,9 @@ union perf_event *perf_mmap__read_event(struct mmap *map)
static bool perf_mmap__empty(struct mmap *map)
{
- return perf_mmap__read_head(map) == map->core.prev && !map->auxtrace_mmap.base;
+ struct perf_event_mmap_page *pc = map->core.base;
+
+ return perf_mmap__read_head(map) == map->core.prev && !pc->aux_size;
}
void perf_mmap__consume(struct mmap *map)
--
2.21.0
Powered by blists - more mailing lists