Commit 67235093 authored by Leo Yan's avatar Leo Yan Committed by Zheng Zengkai
Browse files

perf mem: Search event name with more flexible path

mainline inclusion
from mainline-v5.11-rc1
commit f9f16dfb
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4NGPV


CVE: NA

-------------------------------------------------

The perf tool searches a memory event name under the folder
'/sys/devices/cpu/events/', this leads to the limitation for the
selection of a memory profiling event which must be under this folder.

Thus it's impossible to use any other event as memory event which is not
under this specific folder, e.g. Arm SPE hardware event is not located
in '/sys/devices/cpu/events/' so it cannot be enabled for memory
profiling.

This patch changes to search folder from '/sys/devices/cpu/events/' to
'/sys/devices', so it give flexibility to find events which can be used
for memory profiling.

Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/r/20201106094853.21082-2-leo.yan@linaro.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarYang Jihong <yangjihong1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c533562a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment