perf: Fix sibling iteration
authorPeter Zijlstra <peterz@infradead.org>
Thu, 15 Mar 2018 16:36:56 +0000 (17:36 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 Mar 2018 19:44:12 +0000 (20:44 +0100)
commitedb39592a5877bd91b2e6ee15194268f35b04892
tree6396a76854da50f0df271c7bf4b6cc7c1d45ca8a
parent32ff77e8cc9e66cc4fb38098f64fd54cc8f54573
perf: Fix sibling iteration

Mark noticed that the change to sibling_list changed some iteration
semantics; because previously we used group_list as list entry,
sibling events would always have an empty sibling_list.

But because we now use sibling_list for both list head and list entry,
siblings will report as having siblings.

Fix this with a custom for_each_sibling_event() iterator.

Fixes: 8343aae66167 ("perf/core: Remove perf_event::group_entry")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: vincent.weaver@maine.edu
Cc: alexander.shishkin@linux.intel.com
Cc: torvalds@linux-foundation.org
Cc: alexey.budankov@linux.intel.com
Cc: valery.cherepennikov@intel.com
Cc: eranian@google.com
Cc: acme@redhat.com
Cc: linux-tip-commits@vger.kernel.org
Cc: davidcc@google.com
Cc: kan.liang@intel.com
Cc: Dmitry.Prohorov@intel.com
Cc: jolsa@redhat.com
Link: https://lkml.kernel.org/r/20180315170129.GX4043@hirez.programming.kicks-ass.net
19 files changed:
arch/alpha/kernel/perf_event.c
arch/arm/mach-imx/mmdc.c
arch/arm/mm/cache-l2x0-pmu.c
arch/mips/kernel/perf_event_mipsxx.c
arch/powerpc/perf/core-book3s.c
arch/powerpc/perf/core-fsl-emb.c
arch/sparc/kernel/perf_event.c
arch/x86/events/core.c
arch/x86/events/intel/uncore.c
drivers/bus/arm-cci.c
drivers/bus/arm-ccn.c
drivers/perf/arm_dsu_pmu.c
drivers/perf/arm_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.c
drivers/perf/qcom_l2_pmu.c
drivers/perf/qcom_l3_pmu.c
drivers/perf/xgene_pmu.c
include/linux/perf_event.h
kernel/events/core.c