Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
perf: Add ARM DMC-620 PMU driver.
Browse files Browse the repository at this point in the history
This driver supports ARM DMC-620 PMU which does not
have Ampere's specific code besides ACPI ID.

To display list of events, do perf list and look at
belongs to dmc620_x where x is the MCU ID in the system.

Example:
 #perf stat -e dmc620_0/clk_cycle_count/ -C 0
 Get perf event for clk_cycle_count counter of MCU 0. Note
that above command use "-C 0" to prevent perf rotate events
in all CPUs. DMC620 counters are global and not depend on any
CPU. CPU 0 is used at it is always on in default configuration.

 #perf stat -e dmc620_0/clkdiv2_allocate,mask=0x1f,match=0x2f,
  incr=2,invert=1/ -C 0
 The above example shows how to specify mask, match, incr,
 invert parameters in any counters.

Signed-off-by: Tuan Phan <[email protected]>
  • Loading branch information
tphan-ampere committed Apr 21, 2020
1 parent be18683 commit e287be8
Show file tree
Hide file tree
Showing 3 changed files with 828 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/perf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,11 @@ config ARM_SPE_PMU
Extension, which provides periodic sampling of operations in
the CPU pipeline and reports this via the perf AUX interface.

config ARM_DMC620_PMU
bool "Enable support for the DMC-620 PMU"
depends on ARM64 && ACPI
default n
help
Enable perf support for the DMC-620 PMU.

endmenu
1 change: 1 addition & 0 deletions drivers/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ obj-$(CONFIG_QCOM_L2_PMU) += qcom_l2_pmu.o
obj-$(CONFIG_QCOM_L3_PMU) += qcom_l3_pmu.o
obj-$(CONFIG_XGENE_PMU) += xgene_pmu.o
obj-$(CONFIG_ARM_SPE_PMU) += arm_spe_pmu.o
obj-$(CONFIG_ARM_DMC620_PMU) += arm_dmc620_pmu.o
Loading

0 comments on commit e287be8

Please sign in to comment.