From 1b3f87fc001e868b6d93df9b0581469df6807e7f Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 24 Oct 2023 14:42:02 +0800 Subject: [PATCH] perf auxtrace: Record whether an auxtrace mmap is needed mainline inclusion from mainline-v6.1-rc1 commit 057381a7ece1b2726509ce47cdb9c1a111acfce9 category: Bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7HI80 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=057381a7ece1b2726509ce47cdb9c1a111acfce9 -------------------------------- Remove ->idx() per_cpu parameter because it isn't needed. Add a flag needs_auxtrace_mmap to record whether an auxtrace mmap is needed, in preparation for correctly determining whether or not an auxtrace mmap is needed. Reviewed-by: Leo Yan Signed-off-by: Qi Liu Signed-off-by: Yicong Yang Acked-by: John Garry Link: https://lore.kernel.org/r/20220927081400.14364-3-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Junhao He Auxtrace mmap is needed is added to the source patch [1], However, it is deleted when upstream openEuler. Therefore, this patch adds this modification to OpenEuler OLK-5.10. [1] 057381a7ece1 "perf auxtrace arm64: Add support for HiSilicon PCIe Tune and Trace device driver" --- tools/perf/arch/arm64/util/hisi-ptt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/arm64/util/hisi-ptt.c b/tools/perf/arch/arm64/util/hisi-ptt.c index 110b2edf3e6b..97696b6e1dd5 100644 --- a/tools/perf/arch/arm64/util/hisi-ptt.c +++ b/tools/perf/arch/arm64/util/hisi-ptt.c @@ -113,6 +113,7 @@ static int hisi_ptt_recording_options(struct auxtrace_record *itr, } evsel->core.attr.freq = 0; evsel->core.attr.sample_period = 1; + evsel->needs_auxtrace_mmap = true; hisi_ptt_evsel = evsel; opts->full_auxtrace = true; } -- Gitee