Re: [PATCH v9 2/2] perf vendor events arm64: Add Fujitsu A64FX pmu event

2021-03-15 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 09, 2021 at 11:59:18AM -0500, Masayoshi Mizuma escreveu:
> On Mon, Mar 08, 2021 at 07:53:41PM +0900, Shunsuke Nakamura wrote:
> > Add pmu events for A64FX.
> > 
> > Documentation source:
> > https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf
> 
> The PMU events described in above document seems to work well
> with this patch!
> Please feel free to add:
> 
> Tested-by: Masayoshi Mizuma 

Thanks, applied.

- Arnaldo

 
> Thanks!
> Masa
> 
> > 
> > Signed-off-by: Shunsuke Nakamura 
> > Reviewed-by: John Garry 
> > ---
> >  .../arch/arm64/fujitsu/a64fx/branch.json  |   8 +
> >  .../arch/arm64/fujitsu/a64fx/bus.json |  62 ++
> >  .../arch/arm64/fujitsu/a64fx/cache.json   | 128 
> >  .../arch/arm64/fujitsu/a64fx/cycle.json   |   5 +
> >  .../arch/arm64/fujitsu/a64fx/exception.json   |  29 +++
> >  .../arch/arm64/fujitsu/a64fx/instruction.json | 131 
> >  .../arch/arm64/fujitsu/a64fx/memory.json  |   8 +
> >  .../arch/arm64/fujitsu/a64fx/other.json   | 188 +
> >  .../arch/arm64/fujitsu/a64fx/pipeline.json| 194 ++
> >  .../arch/arm64/fujitsu/a64fx/sve.json | 110 ++
> >  tools/perf/pmu-events/arch/arm64/mapfile.csv  |   1 +
> >  11 files changed, 864 insertions(+)
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
> >  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cache.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cycle.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/exception.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/instruction.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/memory.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/other.json
> >  create mode 100644 
> > tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/pipeline.json
> >  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/sve.json
> > 
> > diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json 
> > b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
> > new file mode 100644
> > index ..b011af11bf94
> > --- /dev/null
> > +++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
> > @@ -0,0 +1,8 @@
> > +[
> > +  {
> > +"ArchStdEvent": "BR_MIS_PRED"
> > +  },
> > +  {
> > +"ArchStdEvent": "BR_PRED"
> > +  }
> > +]
> > diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json 
> > b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
> > new file mode 100644
> > index ..084e88d7df73
> > --- /dev/null
> > +++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
> > @@ -0,0 +1,62 @@
> > +[
> > +  {
> > +"PublicDescription": "This event counts read transactions from tofu 
> > controller to measured CMG.",
> > +"EventCode": "0x314",
> > +"EventName": "BUS_READ_TOTAL_TOFU",
> > +"BriefDescription": "This event counts read transactions from tofu 
> > controller to measured CMG."
> > +  },
> > +  {
> > +"PublicDescription": "This event counts read transactions from PCI 
> > controller to measured CMG.",
> > +"EventCode": "0x315",
> > +"EventName": "BUS_READ_TOTAL_PCI",
> > +"BriefDescription": "This event counts read transactions from PCI 
> > controller to measured CMG."
> > +  },
> > +  {
> > +"PublicDescription": "This event counts read transactions from 
> > measured CMG local memory to measured CMG.",
> > +"EventCode": "0x316",
> > +"EventName": "BUS_READ_TOTAL_MEM",
> > +"BriefDescription": "This event counts read transactions from measured 
> > CMG local memory to measured CMG."
> > +  },
> > +  {
> > +"PublicDescription": "This event counts write transactions from 
> > measured CMG to CMG0, if measured CMG is not CMG0.",
> > +"EventCode": "0x318",
> > +"EventName": "BUS_WRITE_TOTAL_CMG0",
> > +"BriefDescription": "This event counts write transactions from 
> > measured CMG to CMG0, if measured CMG is not CMG0."
> > +  },
> > +  {
> > +"PublicDescription": "This event counts write transactions from 
> > measured CMG to CMG1, if measured CMG is not CMG1.",
> > +"EventCode": "0x319",
> > +"EventName": "BUS_WRITE_TOTAL_CMG1",
> > +"BriefDescription": "This event counts write transactions from 
> > measured CMG to CMG1, if measured CMG is not CMG1."
> > +  },
> > +  {
> > +"PublicDescription": "This event counts write transactions from 
> > measured CMG to CMG2, if measured CMG is not CMG2.",
> > +"EventCode": "0x31A",
> > +"EventName": "BUS_WRITE_TOTAL_CMG2",
> > +"BriefDescription": "This event counts write transactions from 
> > measured CMG to CMG2, if measured CMG is not CMG2."
> > +  },
> > +  {
> > +

Re: [PATCH v9 2/2] perf vendor events arm64: Add Fujitsu A64FX pmu event

2021-03-09 Thread Masayoshi Mizuma
On Mon, Mar 08, 2021 at 07:53:41PM +0900, Shunsuke Nakamura wrote:
> Add pmu events for A64FX.
> 
> Documentation source:
> https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf

The PMU events described in above document seems to work well
with this patch!
Please feel free to add:

Tested-by: Masayoshi Mizuma 

Thanks!
Masa

> 
> Signed-off-by: Shunsuke Nakamura 
> Reviewed-by: John Garry 
> ---
>  .../arch/arm64/fujitsu/a64fx/branch.json  |   8 +
>  .../arch/arm64/fujitsu/a64fx/bus.json |  62 ++
>  .../arch/arm64/fujitsu/a64fx/cache.json   | 128 
>  .../arch/arm64/fujitsu/a64fx/cycle.json   |   5 +
>  .../arch/arm64/fujitsu/a64fx/exception.json   |  29 +++
>  .../arch/arm64/fujitsu/a64fx/instruction.json | 131 
>  .../arch/arm64/fujitsu/a64fx/memory.json  |   8 +
>  .../arch/arm64/fujitsu/a64fx/other.json   | 188 +
>  .../arch/arm64/fujitsu/a64fx/pipeline.json| 194 ++
>  .../arch/arm64/fujitsu/a64fx/sve.json | 110 ++
>  tools/perf/pmu-events/arch/arm64/mapfile.csv  |   1 +
>  11 files changed, 864 insertions(+)
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cache.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cycle.json
>  create mode 100644 
> tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/exception.json
>  create mode 100644 
> tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/instruction.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/memory.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/other.json
>  create mode 100644 
> tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/pipeline.json
>  create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/sve.json
> 
> diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json 
> b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
> new file mode 100644
> index ..b011af11bf94
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
> @@ -0,0 +1,8 @@
> +[
> +  {
> +"ArchStdEvent": "BR_MIS_PRED"
> +  },
> +  {
> +"ArchStdEvent": "BR_PRED"
> +  }
> +]
> diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json 
> b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
> new file mode 100644
> index ..084e88d7df73
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
> @@ -0,0 +1,62 @@
> +[
> +  {
> +"PublicDescription": "This event counts read transactions from tofu 
> controller to measured CMG.",
> +"EventCode": "0x314",
> +"EventName": "BUS_READ_TOTAL_TOFU",
> +"BriefDescription": "This event counts read transactions from tofu 
> controller to measured CMG."
> +  },
> +  {
> +"PublicDescription": "This event counts read transactions from PCI 
> controller to measured CMG.",
> +"EventCode": "0x315",
> +"EventName": "BUS_READ_TOTAL_PCI",
> +"BriefDescription": "This event counts read transactions from PCI 
> controller to measured CMG."
> +  },
> +  {
> +"PublicDescription": "This event counts read transactions from measured 
> CMG local memory to measured CMG.",
> +"EventCode": "0x316",
> +"EventName": "BUS_READ_TOTAL_MEM",
> +"BriefDescription": "This event counts read transactions from measured 
> CMG local memory to measured CMG."
> +  },
> +  {
> +"PublicDescription": "This event counts write transactions from measured 
> CMG to CMG0, if measured CMG is not CMG0.",
> +"EventCode": "0x318",
> +"EventName": "BUS_WRITE_TOTAL_CMG0",
> +"BriefDescription": "This event counts write transactions from measured 
> CMG to CMG0, if measured CMG is not CMG0."
> +  },
> +  {
> +"PublicDescription": "This event counts write transactions from measured 
> CMG to CMG1, if measured CMG is not CMG1.",
> +"EventCode": "0x319",
> +"EventName": "BUS_WRITE_TOTAL_CMG1",
> +"BriefDescription": "This event counts write transactions from measured 
> CMG to CMG1, if measured CMG is not CMG1."
> +  },
> +  {
> +"PublicDescription": "This event counts write transactions from measured 
> CMG to CMG2, if measured CMG is not CMG2.",
> +"EventCode": "0x31A",
> +"EventName": "BUS_WRITE_TOTAL_CMG2",
> +"BriefDescription": "This event counts write transactions from measured 
> CMG to CMG2, if measured CMG is not CMG2."
> +  },
> +  {
> +"PublicDescription": "This event counts write transactions from measured 
> CMG to CMG3, if measured CMG is not CMG3.",
> +"EventCode": "0x31B",
> +"EventName": "BUS_WRITE_TOTAL_CMG3",
> +"BriefDescription": "This event counts write transactions from measured 
> CMG to CMG3, if measured CMG is not CMG3."
> +  },
> +  {
> +"PublicDescription": 

[PATCH v9 2/2] perf vendor events arm64: Add Fujitsu A64FX pmu event

2021-03-08 Thread Shunsuke Nakamura
Add pmu events for A64FX.

Documentation source:
https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf

Signed-off-by: Shunsuke Nakamura 
Reviewed-by: John Garry 
---
 .../arch/arm64/fujitsu/a64fx/branch.json  |   8 +
 .../arch/arm64/fujitsu/a64fx/bus.json |  62 ++
 .../arch/arm64/fujitsu/a64fx/cache.json   | 128 
 .../arch/arm64/fujitsu/a64fx/cycle.json   |   5 +
 .../arch/arm64/fujitsu/a64fx/exception.json   |  29 +++
 .../arch/arm64/fujitsu/a64fx/instruction.json | 131 
 .../arch/arm64/fujitsu/a64fx/memory.json  |   8 +
 .../arch/arm64/fujitsu/a64fx/other.json   | 188 +
 .../arch/arm64/fujitsu/a64fx/pipeline.json| 194 ++
 .../arch/arm64/fujitsu/a64fx/sve.json | 110 ++
 tools/perf/pmu-events/arch/arm64/mapfile.csv  |   1 +
 11 files changed, 864 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cache.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/cycle.json
 create mode 100644 
tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/exception.json
 create mode 100644 
tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/instruction.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/memory.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/other.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/pipeline.json
 create mode 100644 tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/sve.json

diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json 
b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
new file mode 100644
index ..b011af11bf94
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/branch.json
@@ -0,0 +1,8 @@
+[
+  {
+"ArchStdEvent": "BR_MIS_PRED"
+  },
+  {
+"ArchStdEvent": "BR_PRED"
+  }
+]
diff --git a/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json 
b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
new file mode 100644
index ..084e88d7df73
--- /dev/null
+++ b/tools/perf/pmu-events/arch/arm64/fujitsu/a64fx/bus.json
@@ -0,0 +1,62 @@
+[
+  {
+"PublicDescription": "This event counts read transactions from tofu 
controller to measured CMG.",
+"EventCode": "0x314",
+"EventName": "BUS_READ_TOTAL_TOFU",
+"BriefDescription": "This event counts read transactions from tofu 
controller to measured CMG."
+  },
+  {
+"PublicDescription": "This event counts read transactions from PCI 
controller to measured CMG.",
+"EventCode": "0x315",
+"EventName": "BUS_READ_TOTAL_PCI",
+"BriefDescription": "This event counts read transactions from PCI 
controller to measured CMG."
+  },
+  {
+"PublicDescription": "This event counts read transactions from measured 
CMG local memory to measured CMG.",
+"EventCode": "0x316",
+"EventName": "BUS_READ_TOTAL_MEM",
+"BriefDescription": "This event counts read transactions from measured CMG 
local memory to measured CMG."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to CMG0, if measured CMG is not CMG0.",
+"EventCode": "0x318",
+"EventName": "BUS_WRITE_TOTAL_CMG0",
+"BriefDescription": "This event counts write transactions from measured 
CMG to CMG0, if measured CMG is not CMG0."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to CMG1, if measured CMG is not CMG1.",
+"EventCode": "0x319",
+"EventName": "BUS_WRITE_TOTAL_CMG1",
+"BriefDescription": "This event counts write transactions from measured 
CMG to CMG1, if measured CMG is not CMG1."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to CMG2, if measured CMG is not CMG2.",
+"EventCode": "0x31A",
+"EventName": "BUS_WRITE_TOTAL_CMG2",
+"BriefDescription": "This event counts write transactions from measured 
CMG to CMG2, if measured CMG is not CMG2."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to CMG3, if measured CMG is not CMG3.",
+"EventCode": "0x31B",
+"EventName": "BUS_WRITE_TOTAL_CMG3",
+"BriefDescription": "This event counts write transactions from measured 
CMG to CMG3, if measured CMG is not CMG3."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to tofu controller.",
+"EventCode": "0x31C",
+"EventName": "BUS_WRITE_TOTAL_TOFU",
+"BriefDescription": "This event counts write transactions from measured 
CMG to tofu controller."
+  },
+  {
+"PublicDescription": "This event counts write transactions from measured 
CMG to PCI controller.",
+"EventCode": "0x31D",
+"EventName": "BUS_WRITE_TOTAL_PCI",
+