ARM: perf: updates for 3.15
cover ARM: perf: updates for 3.15
Hello,
Here is a handful of ARM perf patches that I plan to push for 3.15 that I don't think have previously been on the list. I've also got Stephen Boyd's series adding support for Krait, but they've already been reviewed here.
Cheers,
Will
--->8
Albin Tonnerre (1):
ARM: perf: add support for the Cortex-A12 PMU
Mark Rutland (1):
ARM: perf: remove unused PMU probing code
Will Deacon (1):
ARM: perf: hook up perf_sample_event_took around pmu irq handling
Documentation/devicetree/bindings/arm/pmu.txt | 1 + arch/arm/kernel/perf_event.c | 11 +- arch/arm/kernel/perf_event_cpu.c | 10 +- arch/arm/kernel/perf_event_v7.c | 158 ++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 11 deletions(-)
Signature · 1 line
1.8.2.2
PATCH 1/3 ARM: perf: hook up perf_sample_event_took around pmu irq handling
Since we indirect all of our PMU IRQ handling through a dispatcher, it's trivial to hook up perf_sample_event_took to prevent applications such as oprofile from generating interrupt storms due to an unrealisticly low sample period.
--- arch/arm/kernel/perf_event.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
arch/arm/kernel/perf_event.c +9 -2
@@ -302,6 +302,8 @@ static irqreturn_t armpmu_dispatch_irq(int irq, void *dev)struct arm_pmu *armpmu;struct platform_device *plat_device;struct arm_pmu_platdata *plat; +int ret; +u64 start_clock, finish_clock;if (irq_is_percpu (irq)) dev = *(void **)dev;
@@ -309,10 +311,15 @@ static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) plat_device = armpmu->plat_device; plat =dev_get_platdata (&plat_device->dev); + start_clock =sched_clock ();if (plat && plat->handle_irq) -return plat->handle_irq (irq, dev, armpmu->handle_irq); + ret = plat->handle_irq (irq, dev, armpmu->handle_irq);else -return armpmu->handle_irq (irq, dev); + ret = armpmu->handle_irq (irq, dev); + finish_clock =sched_clock (); + +perf_sample_event_took (finish_clock - start_clock); +return ret; } static void
Signature · 1 line
1.8.2.2
PATCH 2/3 ARM: perf: remove unused PMU probing code
In reply to Will DeaconFrom: Mark Rutland <[email protected]>
The ARM perf backend can discover the type of PMU it needs to drive either from DT or by probing a CPU it is running on. For Cortex-A{5,7,15} there are no platforms in mainline not using dt, and this probing won't work well for big.LITTLE systems with heterogeneous PMUs.
This patch drops the probing for those CPUs, relying on information from dt instead. Future platforms should describe their PMU(s) with dt.
--- arch/arm/kernel/perf_event_cpu.c | 9 --------- 1 file changed, 9 deletions(-)
arch/arm/kernel/perf_event_cpu.c +0 -9
@@ -267,15 +267,6 @@ static int probe_current_pmu(struct arm_pmu *pmu)case ARM_CPU_PART_CORTEX_A9 : ret =armv7_a9_pmu_init (pmu);break ; -case ARM_CPU_PART_CORTEX_A5 : - ret =armv7_a5_pmu_init (pmu); -break ; -case ARM_CPU_PART_CORTEX_A15 : - ret =armv7_a15_pmu_init (pmu); -break ; -case ARM_CPU_PART_CORTEX_A7 : - ret =armv7_a7_pmu_init (pmu); -break ; }/* Intel CPUs [xscale]. */ }else if (implementor ==ARM_CPU_IMP_INTEL ) {
Signature · 1 line
1.8.2.2
PATCH 3/3 ARM: perf: add support for the Cortex-A12 PMU
In reply to Will DeaconFrom: Albin Tonnerre <[email protected]>
Cortex-A12 implements Performance Monitors compliant with the PMUv2 architecture.
This patch adds support for the Cortex-A12 PMU to the ARM perf backend.
--- Documentation/devicetree/bindings/arm/pmu.txt | 1 + arch/arm/kernel/perf_event_cpu.c | 1 + arch/arm/kernel/perf_event_v7.c | 158 ++++++++++++++++++++++++++ 3 files changed, 160 insertions(+)
Documentation/devicetree/bindings/arm/pmu.txt +1 -0
@@ -9,6 +9,7 @@ Required properties: - compatible : should be one of "arm,armv8-pmuv3" "arm,cortex-a15-pmu" + "arm,cortex-a12-pmu" "arm,cortex-a9-pmu" "arm,cortex-a8-pmu" "arm,cortex-a7-pmu"
arch/arm/kernel/perf_event_cpu.c +1 -0
@@ -222,6 +222,7 @@ static struct notifier_block cpu_pmu_hotplug_notifier = {*/ static struct of_device_id cpu_pmu_of_device_ids[] = { {.compatible ="arm,cortex-a15-pmu" , .data = armv7_a15_pmu_init}, + {.compatible ="arm,cortex-a12-pmu" , .data = armv7_a12_pmu_init}, {.compatible ="arm,cortex-a9-pmu" , .data = armv7_a9_pmu_init}, {.compatible ="arm,cortex-a8-pmu" , .data = armv7_a8_pmu_init}, {.compatible ="arm,cortex-a7-pmu" , .data = armv7_a7_pmu_init},
arch/arm/kernel/perf_event_v7.c +158 -0
188 lines not on this page · raw message
Signature · 1 line
1.8.2.2