[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157111750023.12254.15935532577728517772.tip-bot2@tip-bot2>
Date: Tue, 15 Oct 2019 05:31:40 -0000
From: "tip-bot2 for Jiri Olsa" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jiri Olsa <jolsa@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Michael Petlan <mpetlan@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf tools: Use perf_mmap way to detect aux mmap
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 1d40ae4e1784bfa1646fd153ca022db21511284f
Gitweb: https://git.kernel.org/tip/1d40ae4e1784bfa1646fd153ca022db21511284f
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Mon, 07 Oct 2019 14:53:16 +02:00
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitterDate: Thu, 10 Oct 2019 10:11:54 -03:00
perf tools: Use perf_mmap way to detect aux mmap
We will move this code to 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.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Michael Petlan <mpetlan@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lore.kernel.org/lkml/20191007125344.14268-9-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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 9f150d5..f246dd4 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -107,7 +107,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)
Powered by blists - more mailing lists