* [PATCH] perf/dwc_pcie: Convert the events with mixed case to lowercase
@ 2024-10-16 21:01 Ilkka Koskinen
2024-10-24 12:25 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Ilkka Koskinen @ 2024-10-16 21:01 UTC (permalink / raw)
To: Shuai Xue, Jing Zhang, Will Deacon, Mark Rutland
Cc: linux-arm-kernel, linux-kernel, Ilkka Koskinen
Group #1 events had both upper and lower case characters in their names.
Trying to count such events with perf tool results in an error:
$ perf stat -e dwc_rootport_10008/Tx_PCIe_TLP_Data_Payload/ sleep 1
event syntax error: 'dwc_rootport_10008/Tx_PCIe_TLP_Data_Payload/'
\___ Bad event or PMU
Unable to find PMU or event on a PMU of 'dwc_rootport_10008'
event syntax error: '..port_10008/Tx_PCIe_TLP_Data_Payload/'
\___ unknown term 'Tx_PCIe_TLP_Data_Payload' for pmu 'dwc_rootport_10008'
valid terms: eventid,type,lane,config,config1,config2,config3,name,period,percore,metric-id
Run 'perf list' for a list of valid events
Usage: perf stat [<options>] [<command>]
-e, --event <event> event selector. use 'perf list' to list available events
Perf tool assumes the event names are either in lower or upper case. This
is also mentioned in
Documentation/ABI/testing/sysfs-bus-event_source-devices-events
"As performance monitoring event names are case
insensitive in the perf tool, the perf tool only looks
for lower or upper case event names in sysfs to avoid
scanning the directory. It is therefore required the
name of the event here is either lower or upper case."
Change the Group #1 events names to lower case.
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
---
drivers/perf/dwc_pcie_pmu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/perf/dwc_pcie_pmu.c b/drivers/perf/dwc_pcie_pmu.c
index 59526a48499f..126d2c3516ad 100644
--- a/drivers/perf/dwc_pcie_pmu.c
+++ b/drivers/perf/dwc_pcie_pmu.c
@@ -202,10 +202,10 @@ static struct attribute *dwc_pcie_pmu_time_event_attrs[] = {
DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(L1_AUX, 0x09),
/* Group #1 */
- DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(Tx_PCIe_TLP_Data_Payload, 0x20),
- DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(Rx_PCIe_TLP_Data_Payload, 0x21),
- DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(Tx_CCIX_TLP_Data_Payload, 0x22),
- DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(Rx_CCIX_TLP_Data_Payload, 0x23),
+ DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(tx_pcie_tlp_data_payload, 0x20),
+ DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(rx_pcie_tlp_data_payload, 0x21),
+ DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(tx_ccix_tlp_data_payload, 0x22),
+ DWC_PCIE_PMU_TIME_BASE_EVENT_ATTR(rx_ccix_tlp_data_payload, 0x23),
/*
* Leave it to the user to specify the lane ID to avoid generating
--
2.40.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] perf/dwc_pcie: Convert the events with mixed case to lowercase
2024-10-16 21:01 [PATCH] perf/dwc_pcie: Convert the events with mixed case to lowercase Ilkka Koskinen
@ 2024-10-24 12:25 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2024-10-24 12:25 UTC (permalink / raw)
To: Shuai Xue, Jing Zhang, Mark Rutland, Ilkka Koskinen
Cc: catalin.marinas, kernel-team, Will Deacon, linux-arm-kernel,
linux-kernel
On Wed, 16 Oct 2024 14:01:36 -0700, Ilkka Koskinen wrote:
> Group #1 events had both upper and lower case characters in their names.
> Trying to count such events with perf tool results in an error:
>
> $ perf stat -e dwc_rootport_10008/Tx_PCIe_TLP_Data_Payload/ sleep 1
> event syntax error: 'dwc_rootport_10008/Tx_PCIe_TLP_Data_Payload/'
> \___ Bad event or PMU
>
> [...]
Applied to will (for-next/perf), thanks!
[1/1] perf/dwc_pcie: Convert the events with mixed case to lowercase
https://git.kernel.org/will/c/759b5fc6cc3e
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-24 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 21:01 [PATCH] perf/dwc_pcie: Convert the events with mixed case to lowercase Ilkka Koskinen
2024-10-24 12:25 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®