aboutsummaryrefslogtreecommitdiff
path: root/include/linux/perf
AgeCommit message (Collapse)AuthorFilesLines
2016-07-20arm/perf: Fix hotplug state machine conversionSebastian Andrzej Siewior1-0/+1
Mark Rutland pointed out that this commit is incomplete: 7d88eb695a1f ("arm/perf: Convert to hotplug state machine") The problem is that: > We may have multiple PMUs (e.g. two in big.LITTLE systems), and > __oprofile_cpu_pmu only contains one of these. So this conversion is not > correct. > > We were relying on the notifier list implicitly containing a list of > those PMUs. It seems like we need an explicit list here. > > We keep __oprofile_cpu_pmu around for legacy 32-bit users of OProfile > (on non-hetereogeneous systems), and that's all that the variable should > be used for. Introduce arm_pmu_list to correctly handle multiple PMUs in the system. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Acked-by: Mark Rutland <[email protected]> Cc: Anna-Maria Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-07-15arm/perf: Convert to hotplug state machineThomas Gleixner1-1/+0
Straight forward conversion w/o bells and whistles. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Anna-Maria Gleixner <[email protected]> Reviewed-by: Sebastian Andrzej Siewior <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-04-25arm64/perf: Filter common events based on PMCEIDn_EL0Ashok Kumar1-0/+2
The complete common architectural and micro-architectural event number structure is filtered based on PMCEIDn_EL0 and exposed to /sys using is_visibile function pointer in events attribute_group. To filter the events in is_visible function, pmceid based bitmap is stored in arm_pmu structure and the id field from perf_pmu_events_attr is used to check against the bitmap. The function which derives event bitmap from PMCEIDn_EL0 is executed in the cpus, which has the pmu being initialized, for heterogeneous pmu support. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Ashok Kumar <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2016-02-26drivers/perf: arm_pmu: implement CPU_PM notifierLorenzo Pieralisi1-0/+1
When a CPU is suspended (either through suspend-to-RAM or CPUidle), its PMU registers content can be lost, which means that counters registers values that were initialized on power down entry have to be reprogrammed on power-up to make sure the counters set-up is preserved (ie on power-up registers take the reset values on Cold or Warm reset, which can be architecturally UNKNOWN). To guarantee seamless profiling conditions across a core power down this patch adds a CPU PM notifier to ARM pmus, that upon CPU PM entry/exit from low-power states saves/restores the pmu registers set-up (by using the ARM perf API), so that the power-down/up cycle does not affect the perf behaviour (apart from a black-out period between power-up/down CPU PM notifications that is unavoidable). Cc: Will Deacon <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Mathieu Poirier <[email protected]> Cc: Mark Rutland <[email protected]> Acked-by: Ashwin Chaugule <[email protected]> Acked-by: Kevin Hilman <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2016-01-25ARM: perf: Set ARMv7 SDER SUNIDEN bitMartin Fuzzey1-0/+1
ARMv7 counters other than the CPU cycle counter only work if the Secure Debug Enable Register (SDER) SUNIDEN bit is set. Since access to the SDER is only possible in secure state, it will only be done if the device tree property "secure-reg-access" is set. Without this: Performance counter stats for 'sleep 1': 14606094 cycles # 0.000 GHz 0 instructions # 0.00 insns per cycle After applying: Performance counter stats for 'sleep 1': 5843809 cycles 2566484 instructions # 0.44 insns per cycle 1.020144000 seconds time elapsed Some platforms (eg i.MX53) may also need additional platform specific setup. Acked-by: Rob Herring <[email protected]> Signed-off-by: Martin Fuzzey <[email protected]> Signed-off-by: Pooya Keshavarzi <[email protected]> Signed-off-by: George G. Davis <[email protected]> [will: add warning if property is found on arm64] Signed-off-by: Will Deacon <[email protected]>
2015-11-16drivers/perf: kill armpmu_registerMark Rutland1-2/+0
Nothing outside of drivers/perf/arm_pmu.c should call armpmu_register any more, so it no longer needs to be in include/linux/perf/arm_pmu.h. Additionally, by folding it in to arm_pmu_device_probe we can allow drivers to override struct pmu fields without getting blatted by the armpmu code. This patch folds armpmu_register into arm_pmu_device_probe. The logging to the console is moved to after the PMU is successfully registered with the core perf code. Signed-off-by: Mark Rutland <[email protected]> Suggested-by: Will Deacon <[email protected]> Cc: Drew Richardson <[email protected]> Cc: Pawel Moll <[email protected]> Signed-off-by: Will Deacon <[email protected]>
2015-07-31arm: perf: factor arm_pmu core out to driversMark Rutland1-0/+154
To enable sharing of the arm_pmu code with arm64, this patch factors it out to drivers/perf/. A new drivers/perf directory is added for performance monitor drivers to live under. MAINTAINERS is updated accordingly. Files added previously without a corresponsing MAINTAINERS update (perf_regs.c, perf_callchain.c, and perf_event.h) are also added. Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russell King <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Mark Rutland <[email protected]> [will: augmented Kconfig help slightly] Signed-off-by: Will Deacon <[email protected]>