Atomic instructions are both memory-reading and memory-writing
instructions and so should be counted by both LD_RETIRED and ST_RETIRED
performance monitoring events. However LD_RETIRED does not count atomic
instructions.
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
---
tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json | 4 +++-
.../perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
index 0711782bfa6b..13382d29b25f 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
@@ -1,6 +1,8 @@
[
{
- "ArchStdEvent": "LD_RETIRED"
+ "ArchStdEvent": "LD_RETIRED",
+ "Errata": "Errata AC03_CPU_52",
+ "BriefDescription": "Instruction architecturally executed, condition code check pass, load. Impacted by errata -"
},
{
"ArchStdEvent": "MEM_ACCESS_RD"
diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json
index a211d94aacde..6c06bc928415 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json
@@ -1,6 +1,8 @@
[
{
- "ArchStdEvent": "LD_RETIRED"
+ "ArchStdEvent": "LD_RETIRED",
+ "Errata": "Errata AC04_CPU_21",
+ "BriefDescription": "Instruction architecturally executed, condition code check pass, load. Impacted by errata -"
},
{
"ArchStdEvent": "MEM_ACCESS_RD"
--
2.47.0
On 13/03/2025 8:15 pm, Ilkka Koskinen wrote:
> Atomic instructions are both memory-reading and memory-writing
> instructions and so should be counted by both LD_RETIRED and ST_RETIRED
> performance monitoring events. However LD_RETIRED does not count atomic
> instructions.
>
> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> ---
> tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json | 4 +++-
> .../perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
> index 0711782bfa6b..13382d29b25f 100644
> --- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
> +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
> @@ -1,6 +1,8 @@
> [
> {
> - "ArchStdEvent": "LD_RETIRED"
> + "ArchStdEvent": "LD_RETIRED",
> + "Errata": "Errata AC03_CPU_52",
> + "BriefDescription": "Instruction architecturally executed, condition code check pass, load. Impacted by errata -"
I think this could also have a 'Fixes:' tag, either way:
Reviewed-by: James Clark <james.clark@linaro.org>
Hi James,
On Tue, 18 Mar 2025, James Clark wrote:
> On 13/03/2025 8:15 pm, Ilkka Koskinen wrote:
>> Atomic instructions are both memory-reading and memory-writing
>> instructions and so should be counted by both LD_RETIRED and ST_RETIRED
>> performance monitoring events. However LD_RETIRED does not count atomic
>> instructions.
>>
>> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>> ---
>> tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json | 4 +++-
>> .../perf/pmu-events/arch/arm64/ampere/ampereonex/memory.json | 4 +++-
>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
>> b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
>> index 0711782bfa6b..13382d29b25f 100644
>> --- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
>> +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/memory.json
>> @@ -1,6 +1,8 @@
>> [
>> {
>> - "ArchStdEvent": "LD_RETIRED"
>> + "ArchStdEvent": "LD_RETIRED",
>> + "Errata": "Errata AC03_CPU_52",
>> + "BriefDescription": "Instruction architecturally executed,
>> condition code check pass, load. Impacted by errata -"
>
> I think this could also have a 'Fixes:' tag, either way:
>
> Reviewed-by: James Clark <james.clark@linaro.org>
Yeah, that's true. I guess, I was thinking about using 'Fixes' more on
broken patches rather than when adding a patch dealing with a new hw
errata. Well, given you're find with this, I don't think I'll resubmit it
with a Fixes tag this time.
Cheers, Ilkka
© 2016 - 2025 Red Hat, Inc.