Skip to contentSkip to conversation

perf vendor events power10: Update JSON/events

PATCH Applied Kajol Jain 3 participants 6 messages Aug 27, 2024 – Aug 28, 2024 perf events

lore
Share & tools
lore

Kajol Jain

author
#0 lore raw

PATCH 1/3 perf vendor events power10: Update JSON/events

Update JSON/events for power10 platform with additional events.

---
 .../arch/powerpc/power10/datasource.json      | 25 +++++++++++++++++++
 .../arch/powerpc/power10/frontend.json        | 10 ++++++++
 .../pmu-events/arch/powerpc/power10/pmc.json  |  5 ++++
 3 files changed, 40 insertions(+)
tools/perf/pmu-events/arch/powerpc/power10/datasource.json +25 -0
index 0eeaaf1a95b8..283284745d9c 100644
@@ -14,6 +14,31 @@
     "EventName": "PM_DATA_FROM_MEMORY",
     "BriefDescription": "The processor's data cache was reloaded from local, remote, or distant memory due to a demand miss."
   },
+  {
+    "EventCode": "0x0000004080",
+    "EventName": "PM_INST_FROM_L1",
+    "BriefDescription": "An instruction fetch hit in the L1. Each fetch group contains 8 instructions. The same line can hit 4 times if 32 sequential instructions are fetched."
+  },
+  {
+    "EventCode": "0x000000026080",
+    "EventName": "PM_L2_LD_MISS",
+    "BriefDescription": "All successful D-Side Load dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000026880",
+    "EventName": "PM_L2_ST_MISS",
+    "BriefDescription": "All successful D-Side Store dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x010000046880",
+    "EventName": "PM_L2_ST_HIT",
+    "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000036880",
+    "EventName": "PM_L2_INST_MISS",
+    "BriefDescription": "All successful instruction (demand and prefetch) dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
   {
     "EventCode": "0x000300000000C040",
     "EventName": "PM_INST_FROM_L2",
tools/perf/pmu-events/arch/powerpc/power10/frontend.json +10 -0
index 53660c279286..456971f60814 100644
@@ -93,5 +93,15 @@
     "EventCode": "0x400FC",
     "EventName": "PM_ITLB_MISS",
     "BriefDescription": "Instruction TLB reload (after a miss), all page sizes. Includes only demand misses."
+  },
+  {
+    "EventCode": "0x00000040B8",
+    "EventName": "PM_PRED_BR_TKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved taken."
+  },
+  {
+    "EventCode": "0x00000048B8",
+    "EventName": "PM_PRED_BR_NTKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved not taken."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/pmc.json +5 -0
index 0e0253d0e757..04732698d9b2 100644
@@ -104,6 +104,11 @@
     "EventName": "PM_RUN_CYC",
     "BriefDescription": "Processor cycles gated by the run latch."
   },
+  {
+    "EventCode": "0x200F8",
+    "EventName": "PM_EXT_INT",
+    "BriefDescription": "Cycles an external interrupt was active."
+  },
   {
     "EventCode": "0x30010",
     "EventName": "PM_PMC2_OVERFLOW",
Signature · 1 line
2.43.5
author
#1 lore raw

PATCH 2/3 perf vendor events power10: Move the JSON/events

Move some of the JSON/events from others.json to
more appropriate json files for power10 platform.

---
 .../arch/powerpc/power10/cache.json           |  15 ++
 .../arch/powerpc/power10/datasource.json      |  15 ++
 .../arch/powerpc/power10/frontend.json        |  10 ++
 .../arch/powerpc/power10/locks.json           |  10 ++
 .../arch/powerpc/power10/memory.json          |  30 ++++
 .../arch/powerpc/power10/others.json          | 130 ------------------
 .../arch/powerpc/power10/pipeline.json        |  45 ++++++
 .../pmu-events/arch/powerpc/power10/pmc.json  |   5 +
 8 files changed, 130 insertions(+), 130 deletions(-)
tools/perf/pmu-events/arch/powerpc/power10/cache.json +15 -0
index 839ae26945fb..9814a59fce31 100644
@@ -1,4 +1,19 @@
 [
+  {
+    "EventCode": "0x1002C",
+    "EventName": "PM_LD_PREFETCH_CACHE_LINE_MISS",
+    "BriefDescription": "The L1 cache was reloaded with a line that fulfills a prefetch request."
+  },
+  {
+    "EventCode": "0x200FD",
+    "EventName": "PM_L1_ICACHE_MISS",
+    "BriefDescription": "Demand instruction cache miss."
+  },
+  {
+    "EventCode": "0x30068",
+    "EventName": "PM_L1_ICACHE_RELOADED_PREF",
+    "BriefDescription": "Counts all instruction cache prefetch reloads (includes demand turned into prefetch)."
+  },
   {
     "EventCode": "0x300F4",
     "EventName": "PM_RUN_INST_CMPL_CONC",
tools/perf/pmu-events/arch/powerpc/power10/datasource.json +15 -0
index 283284745d9c..a5d5be35b5e6 100644
@@ -1,4 +1,14 @@
 [
+  {
+    "EventCode": "0x1505E",
+    "EventName": "PM_LD_HIT_L1",
+    "BriefDescription": "Load  finished without experiencing an L1 miss."
+  },
+  {
+    "EventCode": "0x100FC",
+    "EventName": "PM_LD_REF_L1",
+    "BriefDescription": "All L1 D cache load references counted at finish, gated by reject. In P9 and earlier this event counted only cacheable loads but in P10 both cacheable and non-cacheable loads are included."
+  },
   {
     "EventCode": "0x200FE",
     "EventName": "PM_DATA_FROM_L2MISS",
@@ -9,6 +19,11 @@
     "EventName": "PM_DATA_FROM_L3MISS",
     "BriefDescription": "The processor's L1 data cache was reloaded from beyond the local core's L3 due to a demand miss."
   },
+  {
+    "EventCode": "0x400F0",
+    "EventName": "PM_LD_DEMAND_MISS_L1_FIN",
+    "BriefDescription": "Load missed L1, counted at finish time."
+  },
   {
     "EventCode": "0x400FE",
     "EventName": "PM_DATA_FROM_MEMORY",
tools/perf/pmu-events/arch/powerpc/power10/frontend.json +10 -0
index 456971f60814..684374fe5699 100644
@@ -84,6 +84,11 @@
     "EventName": "PM_VECTOR_ST_CMPL",
     "BriefDescription": "Vector store instruction completed."
   },
+  {
+    "EventCode": "0x4D05E",
+    "EventName": "PM_BR_CMPL",
+    "BriefDescription": "A branch completed. All branches are included."
+  },
   {
     "EventCode": "0x4E054",
     "EventName": "PM_DTLB_HIT_1G",
@@ -94,6 +99,11 @@
     "EventName": "PM_ITLB_MISS",
     "BriefDescription": "Instruction TLB reload (after a miss), all page sizes. Includes only demand misses."
   },
+  {
+    "EventCode": "0x00000048B4",
+    "EventName": "PM_BR_TKN_UNCOND_FIN",
+    "BriefDescription": "An unconditional branch finished. All unconditional branches are taken."
+  },
   {
     "EventCode": "0x00000040B8",
     "EventName": "PM_PRED_BR_TKN_COND_DIR",
tools/perf/pmu-events/arch/powerpc/power10/locks.json +10 -0
index b5a0d6521963..a8ea4d0def1a 100644
@@ -4,9 +4,19 @@
     "EventName": "PM_STCX_FAIL_FIN",
     "BriefDescription": "Conditional store instruction (STCX) failed. LARX and STCX are instructions used to acquire a lock."
   },
+  {
+    "EventCode": "0x2E014",
+    "EventName": "PM_STCX_FIN",
+    "BriefDescription": "Conditional store instruction (STCX) finished. LARX and STCX are instructions used to acquire a lock."
+  },
   {
     "EventCode": "0x4E050",
     "EventName": "PM_STCX_PASS_FIN",
     "BriefDescription": "Conditional store instruction (STCX) passed. LARX and STCX are instructions used to acquire a lock."
+  },
+  {
+    "EventCode": "0x000000C8B8",
+    "EventName": "PM_STCX_SUCCESS_CMPL",
+    "BriefDescription": "STCX instructions that completed successfully. Specifically, counts only when a pass status is returned from the nest."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/memory.json +30 -0
index 885262957beb..0d7191b3f2c6 100644
@@ -69,6 +69,11 @@
     "EventName": "PM_XFER_FROM_SRC_PMC3",
     "BriefDescription": "The processor's L1 data cache was reloaded from the source specified in MMCR3[30:42]. If MMCR1[16|17] is 0 (default), this count includes only lines that were reloaded to satisfy a demand miss. If MMCR1[16|17] is 1, this count includes both demand misses and prefetch reloads."
   },
+  {
+    "EventCode": "0x3F04A",
+    "EventName": "PM_LSU_ST5_FIN",
+    "BriefDescription": "LSU Finished an internal operation in ST2 port."
+  },
   {
     "EventCode": "0x3C054",
     "EventName": "PM_DERAT_MISS_16M",
@@ -108,5 +113,30 @@
     "EventCode": "0x4C05A",
     "EventName": "PM_DTLB_MISS_1G",
     "BriefDescription": "Data TLB reload (after a miss) page size 1G. Implies radix translation was used. When MMCR1[16]=0 this event counts only for demand misses. When MMCR1[16]=1 this event includes demand misses and prefetches."
+  },
+  {
+    "EventCode": "0x000000F880",
+    "EventName": "PM_SNOOP_TLBIE_CYC",
+    "BriefDescription": "Cycles in which TLBIE snoops are executed in the LSU."
+  },
+  {
+    "EventCode": "0x000000F084",
+    "EventName": "PM_SNOOP_TLBIE_CACHE_WALK_CYC",
+    "BriefDescription": "TLBIE snoop cycles in which the data cache is being walked."
+  },
+  {
+    "EventCode": "0x000000F884",
+    "EventName": "PM_SNOOP_TLBIE_WAIT_ST_CYC",
+    "BriefDescription": "TLBIE snoop cycles in which older stores are still draining."
+  },
+  {
+    "EventCode": "0x000000F088",
+    "EventName": "PM_SNOOP_TLBIE_WAIT_LD_CYC",
+    "BriefDescription": "TLBIE snoop cycles in which older loads are still draining."
+  },
+  {
+    "EventCode": "0x000000F08C",
+    "EventName": "PM_SNOOP_TLBIE_WAIT_MMU_CYC",
+    "BriefDescription": "TLBIE snoop cycles in which the Load-Store unit is waiting for the MMU to finish invalidation."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/others.json +0 -130

169 lines not on this page · raw message

tools/perf/pmu-events/arch/powerpc/power10/pipeline.json +45 -0

73 lines not on this page · raw message

tools/perf/pmu-events/arch/powerpc/power10/pmc.json +5 -0
index 04732698d9b2..6f5b0e8fde12 100644
@@ -129,6 +129,11 @@
     "EventName": "PM_PMC6_OVERFLOW",
     "BriefDescription": "The event selected for PMC6 caused the event counter to overflow."
   },
+  {
+    "EventCode": "0x3405A",
+    "EventName": "PM_PRIVILEGED_INST_CMPL",
+    "BriefDescription": "PowerPC instruction completed while the thread was in Privileged state."
+  },
   {
     "EventCode": "0x3006C",
     "EventName": "PM_RUN_CYC_SMT2_MODE",
Signature · 1 line
2.43.5
author
#2 lore raw

PATCH 3/3 perf vendor events: Move PM_BR_MPRED_CMPL event for power10 platform

In reply to Kajol Jain

Move PM_BR_MPRED_CMPL event from cache.json to frontend.json file for power10 platform

---
 tools/perf/pmu-events/arch/powerpc/power10/cache.json    | 5 -----
 tools/perf/pmu-events/arch/powerpc/power10/frontend.json | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
tools/perf/pmu-events/arch/powerpc/power10/cache.json +0 -5
index 9814a59fce31..b7e0be09ff57 100644
@@ -18,10 +18,5 @@
     "EventCode": "0x300F4",
     "EventName": "PM_RUN_INST_CMPL_CONC",
     "BriefDescription": "PowerPC instruction completed by this thread when all threads in the core had the run-latch set."
-  },
-  {
-    "EventCode": "0x400F6",
-    "EventName": "PM_BR_MPRED_CMPL",
-    "BriefDescription": "A mispredicted branch completed. Includes direction and target."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/frontend.json +5 -0
index 684374fe5699..b6998987ab75 100644
@@ -94,6 +94,11 @@
     "EventName": "PM_DTLB_HIT_1G",
     "BriefDescription": "Data TLB hit (DERAT reload) page size 1G. Implies radix translation. When MMCR1[16]=0 this event counts only for demand misses. When MMCR1[16]=1 this event includes demand misses and prefetches."
   },
+  {
+    "EventCode": "0x400F6",
+    "EventName": "PM_BR_MPRED_CMPL",
+    "BriefDescription": "A mispredicted branch completed. Includes direction and target."
+  },
   {
     "EventCode": "0x400FC",
     "EventName": "PM_ITLB_MISS",
Signature · 1 line
2.43.5
reviewer Reviewed-by on v1 1/3
#3 lore raw
In reply to Kajol Jain
Quoted 4 lines · Kajol Jain

Update JSON/events for power10 platform with additional events.

For the series:

Just to note, the moving of events in patches 2 and 3 is necessary as the filename sets the "topic" in perf list. I'm not sure the whole "topic" thing makes total sense and we may want to revisit it at some date. For example, AMD generally put the topic into the event name, the PMU gives a strong hint of "topic", etc.

Thanks,
Ian

Quoted 81 lines
---
 .../arch/powerpc/power10/datasource.json      | 25 +++++++++++++++++++
 .../arch/powerpc/power10/frontend.json        | 10 ++++++++
 .../pmu-events/arch/powerpc/power10/pmc.json  |  5 ++++
 3 files changed, 40 insertions(+)
tools/perf/pmu-events/arch/powerpc/power10/datasource.json +25 -0
index 0eeaaf1a95b8..283284745d9c 100644
@@ -14,6 +14,31 @@
     "EventName": "PM_DATA_FROM_MEMORY",
     "BriefDescription": "The processor's data cache was reloaded from local, remote, or distant memory due to a demand miss."
   },
+  {
+    "EventCode": "0x0000004080",
+    "EventName": "PM_INST_FROM_L1",
+    "BriefDescription": "An instruction fetch hit in the L1. Each fetch group contains 8 instructions. The same line can hit 4 times if 32 sequential instructions are fetched."
+  },
+  {
+    "EventCode": "0x000000026080",
+    "EventName": "PM_L2_LD_MISS",
+    "BriefDescription": "All successful D-Side Load dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000026880",
+    "EventName": "PM_L2_ST_MISS",
+    "BriefDescription": "All successful D-Side Store dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x010000046880",
+    "EventName": "PM_L2_ST_HIT",
+    "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000036880",
+    "EventName": "PM_L2_INST_MISS",
+    "BriefDescription": "All successful instruction (demand and prefetch) dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
   {
     "EventCode": "0x000300000000C040",
     "EventName": "PM_INST_FROM_L2",
tools/perf/pmu-events/arch/powerpc/power10/frontend.json +10 -0
index 53660c279286..456971f60814 100644
@@ -93,5 +93,15 @@
     "EventCode": "0x400FC",
     "EventName": "PM_ITLB_MISS",
     "BriefDescription": "Instruction TLB reload (after a miss), all page sizes. Includes only demand misses."
+  },
+  {
+    "EventCode": "0x00000040B8",
+    "EventName": "PM_PRED_BR_TKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved taken."
+  },
+  {
+    "EventCode": "0x00000048B8",
+    "EventName": "PM_PRED_BR_NTKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved not taken."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/pmc.json +5 -1
index 0e0253d0e757..04732698d9b2 100644
@@ -104,6 +104,11 @@
     "EventName": "PM_RUN_CYC",
     "BriefDescription": "Processor cycles gated by the run latch."
   },
+  {
+    "EventCode": "0x200F8",
+    "EventName": "PM_EXT_INT",
+    "BriefDescription": "Cycles an external interrupt was active."
+  },
   {
     "EventCode": "0x30010",
     "EventName": "PM_PMC2_OVERFLOW",
--

2.43.5

author
#4 lore raw
Quoted 8 lines · Ian Rogers
Quoted 4 lines · Kajol Jain

Update JSON/events for power10 platform with additional events.

For the series:

Hi Ian,
Thanks for reviewing the patchset.

Quoted 6 lines

Just to note, the moving of events in patches 2 and 3 is necessary as the filename sets the "topic" in perf list. I'm not sure the whole "topic" thing makes total sense and we may want to revisit it at some date. For example, AMD generally put the topic into the event name, the PMU gives a strong hint of "topic", etc.

In my opinion, having topic helps in understanding the area to which given event belongs. And since we have multiple event categories in case of core PMU, Just having PMU name may not not sufficient.
I will check further on adding topic to event name(which AMD is using), my concern is it will increase the event name size. As we already have bigger event names.

But may be rather then picking topic from file name, we can add one separate field to define the topic in json and use that instead?

Thanks,
Kajol Jain

Quoted 85 lines

Thanks,
Ian

Quoted 81 lines
---
 .../arch/powerpc/power10/datasource.json      | 25 +++++++++++++++++++
 .../arch/powerpc/power10/frontend.json        | 10 ++++++++
 .../pmu-events/arch/powerpc/power10/pmc.json  |  5 ++++
 3 files changed, 40 insertions(+)
tools/perf/pmu-events/arch/powerpc/power10/datasource.json +25 -0
index 0eeaaf1a95b8..283284745d9c 100644
@@ -14,6 +14,31 @@
     "EventName": "PM_DATA_FROM_MEMORY",
     "BriefDescription": "The processor's data cache was reloaded from local, remote, or distant memory due to a demand miss."
   },
+  {
+    "EventCode": "0x0000004080",
+    "EventName": "PM_INST_FROM_L1",
+    "BriefDescription": "An instruction fetch hit in the L1. Each fetch group contains 8 instructions. The same line can hit 4 times if 32 sequential instructions are fetched."
+  },
+  {
+    "EventCode": "0x000000026080",
+    "EventName": "PM_L2_LD_MISS",
+    "BriefDescription": "All successful D-Side Load dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000026880",
+    "EventName": "PM_L2_ST_MISS",
+    "BriefDescription": "All successful D-Side Store dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x010000046880",
+    "EventName": "PM_L2_ST_HIT",
+    "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
+  {
+    "EventCode": "0x000000036880",
+    "EventName": "PM_L2_INST_MISS",
+    "BriefDescription": "All successful instruction (demand and prefetch) dispatches for this thread that missed in the L2. Since the event happens in a 2:1 clock domain and is time-sliced across all 4 threads, the event count should be multiplied by 2."
+  },
   {
     "EventCode": "0x000300000000C040",
     "EventName": "PM_INST_FROM_L2",
tools/perf/pmu-events/arch/powerpc/power10/frontend.json +10 -0
index 53660c279286..456971f60814 100644
@@ -93,5 +93,15 @@
     "EventCode": "0x400FC",
     "EventName": "PM_ITLB_MISS",
     "BriefDescription": "Instruction TLB reload (after a miss), all page sizes. Includes only demand misses."
+  },
+  {
+    "EventCode": "0x00000040B8",
+    "EventName": "PM_PRED_BR_TKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved taken."
+  },
+  {
+    "EventCode": "0x00000048B8",
+    "EventName": "PM_PRED_BR_NTKN_COND_DIR",
+    "BriefDescription": "A conditional branch finished with correctly predicted direction. Resolved not taken."
   }
 ]
tools/perf/pmu-events/arch/powerpc/power10/pmc.json +5 -1
index 0e0253d0e757..04732698d9b2 100644
@@ -104,6 +104,11 @@
     "EventName": "PM_RUN_CYC",
     "BriefDescription": "Processor cycles gated by the run latch."
   },
+  {
+    "EventCode": "0x200F8",
+    "EventName": "PM_EXT_INT",
+    "BriefDescription": "Cycles an external interrupt was active."
+  },
   {
     "EventCode": "0x30010",
     "EventName": "PM_PMC2_OVERFLOW",
--

2.43.5