+55
−0
+45
−0
Loading
Merge Pull Request from: @zhangqizhi3 1.Returns true if the second argument is a subset of the first 2.The merge function gives the union of two cpu maps. Add an intersect function which is necessary, for example, when intersecting a PMUs supported CPUs with user requested. 3.A typical "cpu" PMU has no "cpus" or "cpumask" file meaning the CPU map is set to NULL, which also encodes an empty CPU map. Update pmu_cpumask so that if the "cpu" PMU fails to load a CPU map, use a default of all online PMUs. 4.When PMUs have a cpu map in the 'cpus' or 'cpumask' file, perf will try to open events on those CPUs. ARM doesn't remove offline CPUs meaning taking a CPU offline will cause perf commands to fail unless a CPU map is passed on the command line. Ian Rogers (3): perf cpumap: Add is_subset function perf cpumap: Add intersect function perf arm: Workaround ARM PMUs cpu maps having offline cpus Wan Jiabing (1): perf pmu: Add CPU map for "cpu" PMUs tools/lib/perf/cpumap.c | 55 ++++++++++++++++++++++++ tools/lib/perf/include/internal/cpumap.h | 3 +- tools/lib/perf/include/perf/cpumap.h | 2 + tools/perf/arch/arm/util/pmu.c | 14 ++++-- tools/perf/tests/cpumap.c | 45 +++++++++++++++++++ tools/perf/util/cpumap.c | 4 +- tools/perf/util/cpumap.h | 10 ++++- tools/perf/util/pmu.c | 2 +- 8 files changed, 127 insertions(+), 8 deletions(-) Link:https://gitee.com/openeuler/kernel/pulls/12162 Reviewed-by:Xu Kuohai <xukuohai@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>