All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] Please pull JSON files for POWER9 PMU events
@ 2017-08-30 23:15 Sukadev Bhattiprolu
  2017-08-31 16:38 ` Arnaldo Carvalho de Melo
  2017-09-05  5:21 ` [tip:perf/urgent] perf vendor events powerpc: Remove duplicate events tip-bot for Sukadev Bhattiprolu
  0 siblings, 2 replies; 14+ messages in thread
From: Sukadev Bhattiprolu @ 2017-08-30 23:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Anton Blanchard, Jiri Olsa, mpetlan, Michael Ellerman,
	linux-kernel, linuxppc-dev


Hi Arnaldo,

Please pull an update to the JSON files for POWER9 PMU events. This
removes alternate event codes from the JSON files which seem to confuse
perf.

The following changes since commit 1b2f76d77a277bb70d38ad0991ed7f16bbc115a9:

  Merge tag 'perf-core-for-mingo-4.14-20170829' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-29 23:13:56 +0200)

are available in the git repository at:

  https://github.com/sukadev/linux/ p9-json-v3

Sukadev Bhattiprolu (1):
      perf vendor events powerpc: remove duplicate events

 .../pmu-events/arch/powerpc/power9/frontend.json   |    7 +-
 .../perf/pmu-events/arch/powerpc/power9/other.json |  120 --------------------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |    7 +-
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |    7 +-
 4 files changed, 3 insertions(+), 138 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for POWER9 PMU events
  2017-08-30 23:15 [GIT PULL] Please pull JSON files for POWER9 PMU events Sukadev Bhattiprolu
@ 2017-08-31 16:38 ` Arnaldo Carvalho de Melo
  2017-09-05  5:21 ` [tip:perf/urgent] perf vendor events powerpc: Remove duplicate events tip-bot for Sukadev Bhattiprolu
  1 sibling, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-31 16:38 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Anton Blanchard, Jiri Olsa, mpetlan, Michael Ellerman,
	linux-kernel, linuxppc-dev, Andi Kleen

Em Wed, Aug 30, 2017 at 04:15:06PM -0700, Sukadev Bhattiprolu escreveu:
> 
> Hi Arnaldo,
> 
> Please pull an update to the JSON files for POWER9 PMU events. This
> removes alternate event codes from the JSON files which seem to confuse
> perf.
> 
> The following changes since commit 1b2f76d77a277bb70d38ad0991ed7f16bbc115a9:

Thanks, applied and added the CCed people to CC lines in the cset
comment, also added Andi to that CC list.

- Arnaldo
 
>   Merge tag 'perf-core-for-mingo-4.14-20170829' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-08-29 23:13:56 +0200)
> 
> are available in the git repository at:
> 
>   https://github.com/sukadev/linux/ p9-json-v3
> 
> Sukadev Bhattiprolu (1):
>       perf vendor events powerpc: remove duplicate events
> 
>  .../pmu-events/arch/powerpc/power9/frontend.json   |    7 +-
>  .../perf/pmu-events/arch/powerpc/power9/other.json |  120 --------------------
>  .../pmu-events/arch/powerpc/power9/pipeline.json   |    7 +-
>  tools/perf/pmu-events/arch/powerpc/power9/pmc.json |    7 +-
>  4 files changed, 3 insertions(+), 138 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [tip:perf/urgent] perf vendor events powerpc: Remove duplicate events
  2017-08-30 23:15 [GIT PULL] Please pull JSON files for POWER9 PMU events Sukadev Bhattiprolu
  2017-08-31 16:38 ` Arnaldo Carvalho de Melo
@ 2017-09-05  5:21 ` tip-bot for Sukadev Bhattiprolu
  1 sibling, 0 replies; 14+ messages in thread
From: tip-bot for Sukadev Bhattiprolu @ 2017-09-05  5:21 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, mpetlan, sukadev, acme, mingo, andi, mpe, anton,
	linux-kernel, hpa, tglx

Commit-ID:  2a118e1bd22cad57318520d37e3a184b8846c6a2
Gitweb:     http://git.kernel.org/tip/2a118e1bd22cad57318520d37e3a184b8846c6a2
Author:     Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
AuthorDate: Wed, 30 Aug 2017 21:42:23 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 1 Sep 2017 14:46:00 -0300

perf vendor events powerpc: Remove duplicate events

Some POWER PMU event names have multiple/alternate event codes. These
alternate event codes were listed in the POWER9 JSON files for
reference.

But the perf tool does not seem to handle duplicates cleanly. 'perf
list' shows such duplicate events only once, but 'perf stat' ends up
counting the first event code twice, multiplexing if necessary and we
end up with double the event counts.

Remove the duplicate event codes from the JSON files for now.

Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Anton Blanchard <anton@au1.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Link: http://lkml.kernel.org/r/20170830231506.GB20351@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../pmu-events/arch/powerpc/power9/frontend.json   |   7 +-
 .../perf/pmu-events/arch/powerpc/power9/other.json | 120 ---------------------
 .../pmu-events/arch/powerpc/power9/pipeline.json   |   7 +-
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |   7 +-
 4 files changed, 3 insertions(+), 138 deletions(-)

diff --git a/tools/perf/pmu-events/arch/powerpc/power9/frontend.json b/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
index 7e62c46..c63a919 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/frontend.json
@@ -80,11 +80,6 @@
     "BriefDescription": "Load Missed L1, counted at execution time (can be greater than loads finished). LMQ merges are not included in this count. i.e. if a load instruction misses on an address that is already allocated on the LMQ, this event will not increment for that load). Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load."
   },
   {,
-    "EventCode": "0x400F0",
-    "EventName": "PM_LD_MISS_L1",
-    "BriefDescription": "Load Missed L1, counted at execution time (can be greater than loads finished). LMQ merges are not included in this count. i.e. if a load instruction misses on an address that is already allocated on the LMQ, this event will not increment for that load). Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load."
-  },
-  {,
     "EventCode": "0x2E01A",
     "EventName": "PM_CMPLU_STALL_LSU_FLUSH_NEXT",
     "BriefDescription": "Completion stall of one cycle because the LSU requested to flush the next iop in the sequence. It takes 1 cycle for the ISU to process this request before the LSU instruction is allowed to complete"
@@ -374,4 +369,4 @@
     "EventName": "PM_IPTEG_FROM_L31_ECO_MOD",
     "BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's ECO L3 on the same chip due to a instruction side request"
   }
-]
\ No newline at end of file
+]
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/other.json b/tools/perf/pmu-events/arch/powerpc/power9/other.json
index 00f3d2a..54cc3be 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/other.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/other.json
@@ -605,11 +605,6 @@
     "BriefDescription": "RC retries on PB for any load from core (excludes DCBFs)"
   },
   {,
-    "EventCode": "0x3689E",
-    "EventName": "PM_L2_RTY_LD",
-    "BriefDescription": "RC retries on PB for any load from core (excludes DCBFs)"
-  },
-  {,
     "EventCode": "0xE08C",
     "EventName": "PM_LSU0_ERAT_HIT",
     "BriefDescription": "Primary ERAT hit.  There is no secondary ERAT"
@@ -715,11 +710,6 @@
     "BriefDescription": "Lifetime, sample of RD machine 0 valid"
   },
   {,
-    "EventCode": "0x468B4",
-    "EventName": "PM_L3_RD0_BUSY",
-    "BriefDescription": "Lifetime, sample of RD machine 0 valid"
-  },
-  {,
     "EventCode": "0x46080",
     "EventName": "PM_L2_DISP_ALL_L2MISS",
     "BriefDescription": "All successful Ld/St dispatches for this thread that were an L2 miss (excludes i_l2mru_tch_reqs)"
@@ -850,21 +840,11 @@
     "BriefDescription": "RC mach 0 Busy. Used by PMU to sample ave RC lifetime (mach0 used as sample point)"
   },
   {,
-    "EventCode": "0x2608C",
-    "EventName": "PM_RC0_BUSY",
-    "BriefDescription": "RC mach 0 Busy. Used by PMU to sample ave RC lifetime (mach0 used as sample point)"
-  },
-  {,
     "EventCode": "0x36082",
     "EventName": "PM_L2_LD_DISP",
     "BriefDescription": "All successful I-or-D side load dispatches for this thread (excludes i_l2mru_tch_reqs)."
   },
   {,
-    "EventCode": "0x1609E",
-    "EventName": "PM_L2_LD_DISP",
-    "BriefDescription": "All successful D side load dispatches for this thread (L2 miss + L2 hits)"
-  },
-  {,
     "EventCode": "0xF8B0",
     "EventName": "PM_L3_SW_PREF",
     "BriefDescription": "L3 load prefetch, sourced from a software prefetch stream, was sent to the nest"
@@ -1040,11 +1020,6 @@
     "BriefDescription": "L3 castouts in Mepf state for this thread"
   },
   {,
-    "EventCode": "0x168A0",
-    "EventName": "PM_L3_CO_MEPF",
-    "BriefDescription": "L3 CO of line in Mep state (includes casthrough to memory).  The Mepf state indicates that a line was brought in to satisfy an L3 prefetch request"
-  },
-  {,
     "EventCode": "0x460A2",
     "EventName": "PM_L3_LAT_CI_HIT",
     "BriefDescription": "L3 Lateral Castins Hit"
@@ -1150,11 +1125,6 @@
     "BriefDescription": "RC retries on PB for any store from core (excludes DCBFs)"
   },
   {,
-    "EventCode": "0x4689E",
-    "EventName": "PM_L2_RTY_ST",
-    "BriefDescription": "RC retries on PB for any store from core (excludes DCBFs)"
-  },
-  {,
     "EventCode": "0x24040",
     "EventName": "PM_INST_FROM_L2_MEPF",
     "BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 hit without dispatch conflicts on Mepf state. due to an instruction fetch (not prefetch)"
@@ -1255,11 +1225,6 @@
     "BriefDescription": "CO mach 0 Busy. Used by PMU to sample ave CO lifetime (mach0 used as sample point)"
   },
   {,
-    "EventCode": "0x4608C",
-    "EventName": "PM_CO0_BUSY",
-    "BriefDescription": "CO mach 0 Busy. Used by PMU to sample ave CO lifetime (mach0 used as sample point)"
-  },
-  {,
     "EventCode": "0x2C122",
     "EventName": "PM_MRK_DATA_FROM_L3_DISP_CONFLICT_CYC",
     "BriefDescription": "Duration in cycles to reload from local core's L3 with dispatch conflict due to a marked load"
@@ -1395,11 +1360,6 @@
     "BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's Memory due to a instruction side request"
   },
   {,
-    "EventCode": "0x40006",
-    "EventName": "PM_ISLB_MISS",
-    "BriefDescription": "Number of ISLB misses for this thread"
-  },
-  {,
     "EventCode": "0xD8A8",
     "EventName": "PM_ISLB_MISS",
     "BriefDescription": "Instruction SLB miss - Total of all segment sizes"
@@ -1515,11 +1475,6 @@
     "BriefDescription": "All successful I-side dispatches for this thread (excludes i_l2mru_tch reqs)."
   },
   {,
-    "EventCode": "0x3609E",
-    "EventName": "PM_L2_INST",
-    "BriefDescription": "All successful I-side dispatches that were an L2 miss for this thread (excludes i_l2mru_tch reqs)"
-  },
-  {,
     "EventCode": "0x3504C",
     "EventName": "PM_IPTEG_FROM_DL4",
     "BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's L4 on a different Node or Group (Distant) due to a instruction side request"
@@ -1690,11 +1645,6 @@
     "BriefDescription": "All successful I-or-D side load dispatches for this thread that were L2 hits (excludes i_l2mru_tch_reqs)"
   },
   {,
-    "EventCode": "0x2609E",
-    "EventName": "PM_L2_LD_HIT",
-    "BriefDescription": "All successful D side load dispatches for this thread that were L2 hits for this thread"
-  },
-  {,
     "EventCode": "0x168AC",
     "EventName": "PM_L3_CI_USAGE",
     "BriefDescription": "Rotating sample of 16 CI or CO actives"
@@ -1795,21 +1745,11 @@
     "BriefDescription": "Rotating sample of 8 WI valid"
   },
   {,
-    "EventCode": "0x260B6",
-    "EventName": "PM_L3_WI0_BUSY",
-    "BriefDescription": "Rotating sample of 8 WI valid (duplicate)"
-  },
-  {,
     "EventCode": "0x368AC",
     "EventName": "PM_L3_CO0_BUSY",
     "BriefDescription": "Lifetime, sample of CO machine 0 valid"
   },
   {,
-    "EventCode": "0x468AC",
-    "EventName": "PM_L3_CO0_BUSY",
-    "BriefDescription": "Lifetime, sample of CO machine 0 valid"
-  },
-  {,
     "EventCode": "0x2E040",
     "EventName": "PM_DPTEG_FROM_L2_MEPF",
     "BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 hit without dispatch conflicts on Mepf state. due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
@@ -1840,11 +1780,6 @@
     "BriefDescription": "L3 PF received retry port 0, every retry counted"
   },
   {,
-    "EventCode": "0x260AE",
-    "EventName": "PM_L3_P0_PF_RTY",
-    "BriefDescription": "L3 PF received retry port 0, every retry counted"
-  },
-  {,
     "EventCode": "0x268B2",
     "EventName": "PM_L3_LOC_GUESS_WRONG",
     "BriefDescription": "Initial scope=node (LNS) but data from out side local node (near or far or rem). Prediction too Low"
@@ -1895,11 +1830,6 @@
     "BriefDescription": "Lifetime, sample of snooper machine 0 valid"
   },
   {,
-    "EventCode": "0x460AC",
-    "EventName": "PM_L3_SN0_BUSY",
-    "BriefDescription": "Lifetime, sample of snooper machine 0 valid"
-  },
-  {,
     "EventCode": "0x3005C",
     "EventName": "PM_BFU_BUSY",
     "BriefDescription": "Cycles in which all 4 Binary Floating Point units are busy. The BFU is running at capacity"
@@ -1935,11 +1865,6 @@
     "BriefDescription": "Lifetime, sample of PF machine 0 valid"
   },
   {,
-    "EventCode": "0x460B4",
-    "EventName": "PM_L3_PF0_BUSY",
-    "BriefDescription": "Lifetime, sample of PF machine 0 valid"
-  },
-  {,
     "EventCode": "0xC0B0",
     "EventName": "PM_LSU_FLUSH_UE",
     "BriefDescription": "Correctable ECC error on reload data, reported at critical data forward time"
@@ -2085,11 +2010,6 @@
     "BriefDescription": "L3 CO received retry port 1 (memory only), every retry counted"
   },
   {,
-    "EventCode": "0x468AE",
-    "EventName": "PM_L3_P1_CO_RTY",
-    "BriefDescription": "L3 CO received retry port 3 (memory only), every retry counted"
-  },
-  {,
     "EventCode": "0xC0AC",
     "EventName": "PM_LSU_FLUSH_EMSH",
     "BriefDescription": "An ERAT miss was detected after a set-p hit. Erat tracker indicates fail due to tlbmiss and the instruction gets flushed because the instruction was working on the wrong address"
@@ -2195,11 +2115,6 @@
     "BriefDescription": "SNP dispatched for a write and was M (true M); for DMA cacheinj this will pulse if rty/push is required (won't pulse if cacheinj is accepted)"
   },
   {,
-    "EventCode": "0x46886",
-    "EventName": "PM_L2_SN_M_WR_DONE",
-    "BriefDescription": "SNP dispatched for a write and was M (true M); for DMA cacheinj this will pulse if rty/push is required (won't pulse if cacheinj is accepted)"
-  },
-  {,
     "EventCode": "0x489C",
     "EventName": "PM_BR_CORECT_PRED_TAKEN_CMPL",
     "BriefDescription": "Conditional Branch Completed in which the HW correctly predicted the direction as taken.  Counted at completion time"
@@ -2290,21 +2205,11 @@
     "BriefDescription": "SN mach 0 Busy. Used by PMU to sample ave SN lifetime (mach0 used as sample point)"
   },
   {,
-    "EventCode": "0x26090",
-    "EventName": "PM_SN0_BUSY",
-    "BriefDescription": "SN mach 0 Busy. Used by PMU to sample ave SN lifetime (mach0 used as sample point)"
-  },
-  {,
     "EventCode": "0x360AE",
     "EventName": "PM_L3_P0_CO_RTY",
     "BriefDescription": "L3 CO received retry port 0 (memory only), every retry counted"
   },
   {,
-    "EventCode": "0x460AE",
-    "EventName": "PM_L3_P0_CO_RTY",
-    "BriefDescription": "L3 CO received retry port 0 (memory only), every retry counted"
-  },
-  {,
     "EventCode": "0x168A8",
     "EventName": "PM_L3_WI_USAGE",
     "BriefDescription": "Lifetime, sample of Write Inject machine 0 valid"
@@ -2340,26 +2245,11 @@
     "BriefDescription": "L3 PF received retry port 1, every retry counted"
   },
   {,
-    "EventCode": "0x268AE",
-    "EventName": "PM_L3_P1_PF_RTY",
-    "BriefDescription": "L3 PF received retry port 3, every retry counted"
-  },
-  {,
     "EventCode": "0x46082",
     "EventName": "PM_L2_ST_DISP",
     "BriefDescription": "All successful D-side store dispatches for this thread "
   },
   {,
-    "EventCode": "0x1689E",
-    "EventName": "PM_L2_ST_DISP",
-    "BriefDescription": "All successful D-side store dispatches for this thread (L2 miss + L2 hits)"
-  },
-  {,
-    "EventCode": "0x36880",
-    "EventName": "PM_L2_INST_MISS",
-    "BriefDescription": "All successful I-side dispatches that were an L2 miss for this thread (excludes i_l2mru_tch reqs)"
-  },
-  {,
     "EventCode": "0x4609E",
     "EventName": "PM_L2_INST_MISS",
     "BriefDescription": "All successful I-side dispatches that were an L2 miss for this thread (excludes i_l2mru_tch reqs)"
@@ -2430,11 +2320,6 @@
     "BriefDescription": "# PPC Dispatched"
   },
   {,
-    "EventCode": "0x300F2",
-    "EventName": "PM_INST_DISP",
-    "BriefDescription": "# PPC Dispatched"
-  },
-  {,
     "EventCode": "0x4E05E",
     "EventName": "PM_TM_OUTER_TBEGIN_DISP",
     "BriefDescription": "Number of outer tbegin instructions dispatched. The dispatch unit determines whether the tbegin instruction is outer or nested. This is a speculative count, which includes flushed instructions"
@@ -2460,11 +2345,6 @@
     "BriefDescription": "All successful D-side store dispatches for this thread that were L2 hits"
   },
   {,
-    "EventCode": "0x2689E",
-    "EventName": "PM_L2_ST_HIT",
-    "BriefDescription": "All successful D-side store dispatches that were L2 hits for this thread"
-  },
-  {,
     "EventCode": "0x360A8",
     "EventName": "PM_L3_CO",
     "BriefDescription": "L3 castout occurring (does not include casthrough or log writes (cinj/dmaw))"
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json b/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
index 47a8256..bc2db63 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
@@ -420,11 +420,6 @@
     "BriefDescription": "Final Pump Scope (Group) ended up larger than Initial Pump Scope (Chip) for an instruction fetch"
   },
   {,
-    "EventCode": "0x10016",
-    "EventName": "PM_DSLB_MISS",
-    "BriefDescription": "Data SLB Miss - Total of all segment sizes"
-  },
-  {,
     "EventCode": "0xD0A8",
     "EventName": "PM_DSLB_MISS",
     "BriefDescription": "Data SLB Miss - Total of all segment sizes"
@@ -554,4 +549,4 @@
     "EventName": "PM_MRK_DATA_FROM_L21_SHR_CYC",
     "BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's L2 on the same chip due to a marked load"
   }
-]
\ No newline at end of file
+]
diff --git a/tools/perf/pmu-events/arch/powerpc/power9/pmc.json b/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
index a2c95a9..3ef8a10 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/pmc.json
@@ -5,11 +5,6 @@
     "BriefDescription": "Branches that are not strongly biased"
   },
   {,
-    "EventCode": "0x40036",
-    "EventName": "PM_BR_2PATH",
-    "BriefDescription": "Branches that are not strongly biased"
-  },
-  {,
     "EventCode": "0x40056",
     "EventName": "PM_MEM_LOC_THRESH_LSU_HIGH",
     "BriefDescription": "Local memory above threshold for LSU medium"
@@ -124,4 +119,4 @@
     "EventName": "PM_1FLOP_CMPL",
     "BriefDescription": "one flop (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg) operation completed"
   }
-]
\ No newline at end of file
+]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-08-02 17:46 [GIT PULL] Please pull JSON files for Power9 PMU events Sukadev Bhattiprolu
@ 2017-08-02 18:35 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-02 18:35 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Jiri Olsa, Michael Ellerman, Anton Blanchard, linuxppc-dev, linux-kernel

Em Wed, Aug 02, 2017 at 10:46:17AM -0700, Sukadev Bhattiprolu escreveu:
> Hi Arnaldo,
> 
> Please pull some updates/cleanups to the POWER9 PMU events.
> 
> The following changes since commit 81e3d8b2af2e7417f1d5164aab5c1a75955e8a5d:
> 
>   perf trace beautify ioctl: Beautify perf ioctl's 'cmd' arg (2017-08-01 13:33:50 -0300)

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [GIT PULL] Please pull JSON files for Power9 PMU events
@ 2017-08-02 17:46 Sukadev Bhattiprolu
  2017-08-02 18:35 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 14+ messages in thread
From: Sukadev Bhattiprolu @ 2017-08-02 17:46 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Michael Ellerman, Anton Blanchard, linuxppc-dev, linux-kernel

Hi Arnaldo,

Please pull some updates/cleanups to the POWER9 PMU events.

The following changes since commit 81e3d8b2af2e7417f1d5164aab5c1a75955e8a5d:

  perf trace beautify ioctl: Beautify perf ioctl's 'cmd' arg (2017-08-01 13:33:50 -0300)

are available in the git repository at:
  https://github.com/sukadev/linux/ p9-json-v2

Sukadev Bhattiprolu (2):
      perf vendor events powerpc: remove suffix in mapfile
      perf vendor events powerpc: Update POWER9 events

 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   20 +-
 .../perf/pmu-events/arch/powerpc/power9/cache.json |  191 +-
 .../arch/powerpc/power9/floating-point.json        |   42 +-
 .../pmu-events/arch/powerpc/power9/frontend.json   |  517 ++---
 .../pmu-events/arch/powerpc/power9/marked.json     |  905 +++----
 .../pmu-events/arch/powerpc/power9/memory.json     |  178 +-
 .../perf/pmu-events/arch/powerpc/power9/other.json | 2716 ++++++++++++++++----
 .../pmu-events/arch/powerpc/power9/pipeline.json   |  779 +++----
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json |  167 +-
 .../arch/powerpc/power9/translation.json           |  314 +--
 10 files changed, 3521 insertions(+), 2308 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-13  8:09         ` Jiri Olsa
@ 2017-07-13  9:50           ` Michael Ellerman
  0 siblings, 0 replies; 14+ messages in thread
From: Michael Ellerman @ 2017-07-13  9:50 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Sukadev Bhattiprolu, Arnaldo Carvalho de Melo,
	Madhavan Srinivasan, Andi Kleen, ak, linuxppc-dev, linux-kernel,
	mikey, mpetlan

Jiri Olsa <jolsa@redhat.com> writes:

> On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote:
>> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
>> ...
>> >
>> >  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
>> >  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
>> >  .../arch/powerpc/power9/floating-point.json        |  44 ++
>> >  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
>> >  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
>> >  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
>> 
>> In the map file we have "power9.json", but the files are power9/x.json.
>> How does that work?
>
> hum, we take just the base name from that string and use it
> as a map to the directory/struct with events.. so no harm done

I figured it must be working somehow but it's a bit odd :)

> I guess it's the leftover from when we switched from single file
> to per topic event files.. x86 arch seems to have it right

Yep.

> I'll send the fix

Thanks.

cheers

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-13  3:43       ` Michael Ellerman
@ 2017-07-13  8:09         ` Jiri Olsa
  2017-07-13  9:50           ` Michael Ellerman
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Olsa @ 2017-07-13  8:09 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Sukadev Bhattiprolu, Arnaldo Carvalho de Melo,
	Madhavan Srinivasan, Andi Kleen, ak, linuxppc-dev, linux-kernel,
	mikey, mpetlan

On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote:
> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> ...
> >
> >  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
> >  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
> >  .../arch/powerpc/power9/floating-point.json        |  44 ++
> >  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
> >  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
> >  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
> 
> In the map file we have "power9.json", but the files are power9/x.json.
> How does that work?

hum, we take just the base name from that string and use it
as a map to the directory/struct with events.. so no harm done

I guess it's the leftover from when we switched from single file
to per topic event files.. x86 arch seems to have it right

I'll send the fix

thanks,
jirka

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12 16:40     ` Sukadev Bhattiprolu
  2017-07-12 19:49       ` Arnaldo Carvalho de Melo
@ 2017-07-13  3:43       ` Michael Ellerman
  2017-07-13  8:09         ` Jiri Olsa
  1 sibling, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2017-07-13  3:43 UTC (permalink / raw)
  To: Sukadev Bhattiprolu, Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Madhavan Srinivasan, Andi Kleen, ak, linuxppc-dev,
	linux-kernel, mikey, mpetlan

Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
...
>
>  tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
>  .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
>  .../arch/powerpc/power9/floating-point.json        |  44 ++
>  .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
>  .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
>  .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++

In the map file we have "power9.json", but the files are power9/x.json.
How does that work?

cheers

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12 14:46   ` Arnaldo Carvalho de Melo
  2017-07-12 16:40     ` Sukadev Bhattiprolu
@ 2017-07-13  3:42     ` Michael Ellerman
  1 sibling, 0 replies; 14+ messages in thread
From: Michael Ellerman @ 2017-07-13  3:42 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Sukadev Bhattiprolu, Jiri Olsa, Madhavan Srinivasan, Andi Kleen,
	linuxppc-dev, linux-kernel, mikey

Arnaldo Carvalho de Melo <acme@kernel.org> writes:

> Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
>> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
>> > Please pull the JSON files for POWER9 PMU events.
>
>> >       perf vendor events: Add POWER9 PMU events
>> >       perf vendor events: Add POWER9 PVRs to mapfile
>  
>> I think the PVRs need work.
>  
>> You have:
>  
>> +004e0100,1,power9.json,core
>> +004e0000,1,power9.json,core
>  
>> The first is P9 DD1, but the second doesn't exist. We have it in the
>> kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
>> do any masking or anything fancy, it looks for an exact match.
>  
>> So for starters you should probably drop that one and add 0x004e1200 and
>> 0x004e0200.
>
> Could this check be somehow done automatically? Using whatever is in the
> kernel sources or some IBM released document?

Not really no.

The kernel defines the major versions in arch/powerpc/include/asm/reg.h.

eg:

#define PVR_POWER8E	0x004B
#define PVR_POWER8NVL	0x004C
#define PVR_POWER8	0x004D
#define PVR_POWER9	0x004E


But that's only the top part of the value perf is looking for. To match
the full value you also need the minor revision.

I don't actually have an exhaustive list of all the Power8 revisions
that were/will ever be made. And for Power9 I definitely can't give you
a full list yet.

We do want to be able to match against the full PVR, in case we need a
different set of events for a particularly CPU revision.

But we could make it easier to maintain by making the search iterative.
ie. instead of just looking for an exact match, we could say that the
mapfile is sorted, and the first entry that matches will be used.

With a mapfile like:

004e0100,1,power9.json,core
004e,1,power9.json,core

That would match Power9 DD1 on the first line, but all other Power9 CPUs
would hit the second line. Obviously get_cpuid_str() would need to be
reworked to be match_cpuid_str() or something.

cheers

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12 16:40     ` Sukadev Bhattiprolu
@ 2017-07-12 19:49       ` Arnaldo Carvalho de Melo
  2017-07-13  3:43       ` Michael Ellerman
  1 sibling, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-07-12 19:49 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Michael Ellerman, Jiri Olsa, Madhavan Srinivasan, Andi Kleen, ak,
	linuxppc-dev, linux-kernel, mikey, mpetlan

Em Wed, Jul 12, 2017 at 09:40:08AM -0700, Sukadev Bhattiprolu escreveu:
> Arnaldo Carvalho de Melo [acme@kernel.org] wrote:
> > Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> > > So for starters you should probably drop that one and add 0x004e1200 and
> > > 0x004e0200.
 
> Yes, thanks.
 
> > Could this check be somehow done automatically? Using whatever is in the
> > kernel sources or some IBM released document?
 
> Yes, had a recent discussion offline with Michael Petlan and Jiri about
> generalizing/simplifying this. For now, I have added the above PVRs and
> will look into the broader fix.
 
> The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:
 
>   Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)
 
> are available in the git repository at:
 
>   https://github.com/sukadev/linux/ p9-json

Can you please base your branches out ouf tip/perf/core or
acme/perf/core when you submit it with the fixes discussed here?

thanks,

- Arnaldo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12 14:46   ` Arnaldo Carvalho de Melo
@ 2017-07-12 16:40     ` Sukadev Bhattiprolu
  2017-07-12 19:49       ` Arnaldo Carvalho de Melo
  2017-07-13  3:43       ` Michael Ellerman
  2017-07-13  3:42     ` Michael Ellerman
  1 sibling, 2 replies; 14+ messages in thread
From: Sukadev Bhattiprolu @ 2017-07-12 16:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Michael Ellerman, Jiri Olsa, Madhavan Srinivasan, Andi Kleen, ak,
	linuxppc-dev, linux-kernel, mikey, mpetlan

Arnaldo Carvalho de Melo [acme@kernel.org] wrote:
> Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> > Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> > > Please pull the JSON files for POWER9 PMU events.
> 
> > >       perf vendor events: Add POWER9 PMU events
> > >       perf vendor events: Add POWER9 PVRs to mapfile
> 
> > I think the PVRs need work.
> 
> > You have:
> 
> > +004e0100,1,power9.json,core
> > +004e0000,1,power9.json,core
> 
> > The first is P9 DD1, but the second doesn't exist. We have it in the
> > kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
> > do any masking or anything fancy, it looks for an exact match.
> 
> > So for starters you should probably drop that one and add 0x004e1200 and
> > 0x004e0200.

Yes, thanks.

> 
> Could this check be somehow done automatically? Using whatever is in the
> kernel sources or some IBM released document?

Yes, had a recent discussion offline with Michael Petlan and Jiri about
generalizing/simplifying this. For now, I have added the above PVRs and
will look into the broader fix.

The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:

  Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)

are available in the git repository at:

  https://github.com/sukadev/linux/ p9-json

for you to fetch changes up to 8870b54739866c6eea23c36a0125af8045fbd572:

  perf vendor events: Add POWER9 PVRs to mapfile (2017-07-12 11:11:00 -0500)

----------------------------------------------------------------
Sukadev Bhattiprolu (2):
      perf vendor events: Add POWER9 PMU events
      perf vendor events: Add POWER9 PVRs to mapfile

 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   3 +
 .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
 .../arch/powerpc/power9/floating-point.json        |  44 ++
 .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
 .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
 .../perf/pmu-events/arch/powerpc/power9/other.json | 836 +++++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/pipeline.json   | 680 +++++++++++++++++
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 146 ++++
 .../arch/powerpc/power9/translation.json           | 272 +++++++
 10 files changed, 3543 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/cache.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/floating-point.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/frontend.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/marked.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/memory.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/other.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pmc.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/translation.json

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12 12:09 ` Michael Ellerman
@ 2017-07-12 14:46   ` Arnaldo Carvalho de Melo
  2017-07-12 16:40     ` Sukadev Bhattiprolu
  2017-07-13  3:42     ` Michael Ellerman
  0 siblings, 2 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-07-12 14:46 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Sukadev Bhattiprolu, Jiri Olsa, Madhavan Srinivasan, Andi Kleen,
	linuxppc-dev, linux-kernel, mikey

Em Wed, Jul 12, 2017 at 10:09:12PM +1000, Michael Ellerman escreveu:
> Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> > Please pull the JSON files for POWER9 PMU events.

> >       perf vendor events: Add POWER9 PMU events
> >       perf vendor events: Add POWER9 PVRs to mapfile
 
> I think the PVRs need work.
 
> You have:
 
> +004e0100,1,power9.json,core
> +004e0000,1,power9.json,core
 
> The first is P9 DD1, but the second doesn't exist. We have it in the
> kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
> do any masking or anything fancy, it looks for an exact match.
 
> So for starters you should probably drop that one and add 0x004e1200 and
> 0x004e0200.

Could this check be somehow done automatically? Using whatever is in the
kernel sources or some IBM released document?

- Arnaldo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] Please pull JSON files for Power9 PMU events
  2017-07-12  2:08 Sukadev Bhattiprolu
@ 2017-07-12 12:09 ` Michael Ellerman
  2017-07-12 14:46   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2017-07-12 12:09 UTC (permalink / raw)
  To: Sukadev Bhattiprolu, Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Madhavan Srinivasan, Andi Kleen, linuxppc-dev,
	linux-kernel, mikey

Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:

> Hi Arnaldo,
>
> Please pull the JSON files for POWER9 PMU events.
>
> The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:
>
>   Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)
>
> are available in the git repository at:
>
>   https://github.com/sukadev/linux/ p9-json
>
> for you to fetch changes up to f94a86dbb13e18bd7ad566cabe42df63d3bd1039:
>
>   perf vendor events: Add POWER9 PVRs to mapfile (2017-07-11 19:30:40 -0500)
>
> ----------------------------------------------------------------
> Sukadev Bhattiprolu (2):
>       perf vendor events: Add POWER9 PMU events
>       perf vendor events: Add POWER9 PVRs to mapfile

I think the PVRs need work.

You have:

+004e0100,1,power9.json,core
+004e0000,1,power9.json,core

The first is P9 DD1, but the second doesn't exist. We have it in the
kernel, but with a mask of 0xffff0000. From memory the perf code doesn't
do any masking or anything fancy, it looks for an exact match.

So for starters you should probably drop that one and add 0x004e1200 and
0x004e0200.

cheers

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [GIT PULL] Please pull JSON files for Power9 PMU events
@ 2017-07-12  2:08 Sukadev Bhattiprolu
  2017-07-12 12:09 ` Michael Ellerman
  0 siblings, 1 reply; 14+ messages in thread
From: Sukadev Bhattiprolu @ 2017-07-12  2:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Michael Ellerman, Madhavan Srinivasan, Andi Kleen,
	linuxppc-dev, linux-kernel

Hi Arnaldo,

Please pull the JSON files for POWER9 PMU events.

The following changes since commit 07d306c838c5c30196619baae36107d0615e459b:

  Merge git://www.linux-watchdog.org/linux-watchdog (2017-07-11 09:59:37 -0700)

are available in the git repository at:

  https://github.com/sukadev/linux/ p9-json

for you to fetch changes up to f94a86dbb13e18bd7ad566cabe42df63d3bd1039:

  perf vendor events: Add POWER9 PVRs to mapfile (2017-07-11 19:30:40 -0500)

----------------------------------------------------------------
Sukadev Bhattiprolu (2):
      perf vendor events: Add POWER9 PMU events
      perf vendor events: Add POWER9 PVRs to mapfile

 tools/perf/pmu-events/arch/powerpc/mapfile.csv     |   2 +
 .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 +++++
 .../arch/powerpc/power9/floating-point.json        |  44 ++
 .../pmu-events/arch/powerpc/power9/frontend.json   | 446 +++++++++++
 .../pmu-events/arch/powerpc/power9/marked.json     | 782 +++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/memory.json     | 158 ++++
 .../perf/pmu-events/arch/powerpc/power9/other.json | 836 +++++++++++++++++++++
 .../pmu-events/arch/powerpc/power9/pipeline.json   | 680 +++++++++++++++++
 tools/perf/pmu-events/arch/powerpc/power9/pmc.json | 146 ++++
 .../arch/powerpc/power9/translation.json           | 272 +++++++
 10 files changed, 3542 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/cache.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/floating-point.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/frontend.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/marked.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/memory.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/other.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/pmc.json
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/translation.json

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-09-05  5:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 23:15 [GIT PULL] Please pull JSON files for POWER9 PMU events Sukadev Bhattiprolu
2017-08-31 16:38 ` Arnaldo Carvalho de Melo
2017-09-05  5:21 ` [tip:perf/urgent] perf vendor events powerpc: Remove duplicate events tip-bot for Sukadev Bhattiprolu
  -- strict thread matches above, loose matches on Subject: below --
2017-08-02 17:46 [GIT PULL] Please pull JSON files for Power9 PMU events Sukadev Bhattiprolu
2017-08-02 18:35 ` Arnaldo Carvalho de Melo
2017-07-12  2:08 Sukadev Bhattiprolu
2017-07-12 12:09 ` Michael Ellerman
2017-07-12 14:46   ` Arnaldo Carvalho de Melo
2017-07-12 16:40     ` Sukadev Bhattiprolu
2017-07-12 19:49       ` Arnaldo Carvalho de Melo
2017-07-13  3:43       ` Michael Ellerman
2017-07-13  8:09         ` Jiri Olsa
2017-07-13  9:50           ` Michael Ellerman
2017-07-13  3:42     ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.