linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/tools/pmu-events/powerpc: Added nest imc metric events
@ 2020-07-03  6:56 Kajol Jain
  2020-07-06  1:30 ` Ian Rogers
  0 siblings, 1 reply; 3+ messages in thread
From: Kajol Jain @ 2020-07-03  6:56 UTC (permalink / raw)
  To: acme
  Cc: peterz, mingo, mark.rutland, alexander.shishkin, pc, jolsa,
	namhyung, ak, yao.jin, linux-kernel, linux-perf-users, irogers,
	maddy, ravi.bangoria, anju, kan.liang, nasastry, kjain

Added nest imc metric events.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
---
 .../arch/powerpc/power9/nest_metrics.json     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
index c121e526442a..8383a37647ad 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
@@ -15,5 +15,40 @@
 	"MetricExpr": "(hv_24x7@PM_PB_CYC\\,chip\\=?@ )",
         "MetricName": "PowerBUS_Frequency",
         "ScaleUnit": "2.5e-7GHz"
+    },
+    {
+	"MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
+	"MetricName" : "mcs01-read",
+	"MetricGroup" : "memory_bw",
+	"ScaleUnit": "6.1e-5MB"
+    },
+    {
+	"MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
+	"MetricName" : "mcs23-read",
+	"MetricGroup" : "memory_bw",
+	"ScaleUnit": "6.1e-5MB"
+    },
+    {
+	"MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
+	"MetricName" : "mcs01-write",
+	"MetricGroup" : "memory_bw",
+	"ScaleUnit": "6.1e-5MB"
+    },
+    {
+	"MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
+	"MetricName" : "mcs23-write",
+	"MetricGroup" : "memory-bandwidth",
+	"ScaleUnit": "6.1e-5MB"
+    },
+    {
+	"MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
+	"MetricName" : "powerbus_freq",
+	"ScaleUnit": "1e-9GHz"
+    },
+    {
+	"MetricExpr" : "(nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@)",
+	"MetricName" : "Memory-bandwidth-MCS",
+	"MetricGroup" : "memory_bw",
+	"ScaleUnit": "6.1e-5MB"
     }
 ]
-- 
2.17.1


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

* Re: [PATCH] perf/tools/pmu-events/powerpc: Added nest imc metric events
  2020-07-03  6:56 [PATCH] perf/tools/pmu-events/powerpc: Added nest imc metric events Kajol Jain
@ 2020-07-06  1:30 ` Ian Rogers
  2020-07-06 12:38   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2020-07-06  1:30 UTC (permalink / raw)
  To: Kajol Jain
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, Paul Clarke, Jiri Olsa,
	Namhyung Kim, Andi Kleen, Jin Yao, LKML, linux-perf-users, maddy,
	Ravi Bangoria, Anju T Sudhakar, Liang, Kan, nasastry

On Thu, Jul 2, 2020 at 11:57 PM Kajol Jain <kjain@linux.ibm.com> wrote:
>
> Added nest imc metric events.

Acked-by: Ian Rogers <irogers@google.com>

> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> ---
>  .../arch/powerpc/power9/nest_metrics.json     | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> index c121e526442a..8383a37647ad 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> @@ -15,5 +15,40 @@
>         "MetricExpr": "(hv_24x7@PM_PB_CYC\\,chip\\=?@ )",
>          "MetricName": "PowerBUS_Frequency",
>          "ScaleUnit": "2.5e-7GHz"
> +    },
> +    {
> +       "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> +       "MetricName" : "mcs01-read",
> +       "MetricGroup" : "memory_bw",
> +       "ScaleUnit": "6.1e-5MB"

nit: I'm guessing this is from:
64.0/(1024.0*1024.0) = 6.103515625e-05
and for reference:
64.0/(1000.0*1000.0) = 6.3999999999999997e-05
should the unit be MiB?
https://en.wikipedia.org/wiki/Kibibyte

Searching around I only see knightslanding using MiB but it seems to
be using it in the 1000^2 case which probably means it should be MB:
knightslanding/uncore-memory.json:        "ScaleUnit": "6.4e-05MiB"

Given there is some confusion I wonder if it makes sense to just make
this 0.015625B and then we have a utility function that selects the
best unit for "bytes" with config options similar to --big-num?

Thanks,
Ian

> +    },
> +    {
> +       "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> +       "MetricName" : "mcs23-read",
> +       "MetricGroup" : "memory_bw",
> +       "ScaleUnit": "6.1e-5MB"
> +    },
> +    {
> +       "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> +       "MetricName" : "mcs01-write",
> +       "MetricGroup" : "memory_bw",
> +       "ScaleUnit": "6.1e-5MB"
> +    },
> +    {
> +       "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> +       "MetricName" : "mcs23-write",
> +       "MetricGroup" : "memory-bandwidth",
> +       "ScaleUnit": "6.1e-5MB"
> +    },
> +    {
> +       "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
> +       "MetricName" : "powerbus_freq",
> +       "ScaleUnit": "1e-9GHz"
> +    },
> +    {
> +       "MetricExpr" : "(nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@)",
> +       "MetricName" : "Memory-bandwidth-MCS",
> +       "MetricGroup" : "memory_bw",
> +       "ScaleUnit": "6.1e-5MB"
>      }
>  ]
> --
> 2.17.1
>

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

* Re: [PATCH] perf/tools/pmu-events/powerpc: Added nest imc metric events
  2020-07-06  1:30 ` Ian Rogers
@ 2020-07-06 12:38   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-07-06 12:38 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Kajol Jain, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Paul Clarke, Jiri Olsa, Namhyung Kim,
	Andi Kleen, Jin Yao, LKML, linux-perf-users, maddy,
	Ravi Bangoria, Anju T Sudhakar, Liang, Kan, nasastry

Em Sun, Jul 05, 2020 at 06:30:30PM -0700, Ian Rogers escreveu:
> On Thu, Jul 2, 2020 at 11:57 PM Kajol Jain <kjain@linux.ibm.com> wrote:
> >
> > Added nest imc metric events.
> 
> Acked-by: Ian Rogers <irogers@google.com>

Thanks, applied.

- Arnaldo
 
> > Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> > ---
> >  .../arch/powerpc/power9/nest_metrics.json     | 35 +++++++++++++++++++
> >  1 file changed, 35 insertions(+)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > index c121e526442a..8383a37647ad 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json
> > @@ -15,5 +15,40 @@
> >         "MetricExpr": "(hv_24x7@PM_PB_CYC\\,chip\\=?@ )",
> >          "MetricName": "PowerBUS_Frequency",
> >          "ScaleUnit": "2.5e-7GHz"
> > +    },
> > +    {
> > +       "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@",
> > +       "MetricName" : "mcs01-read",
> > +       "MetricGroup" : "memory_bw",
> > +       "ScaleUnit": "6.1e-5MB"
> 
> nit: I'm guessing this is from:
> 64.0/(1024.0*1024.0) = 6.103515625e-05
> and for reference:
> 64.0/(1000.0*1000.0) = 6.3999999999999997e-05
> should the unit be MiB?
> https://en.wikipedia.org/wiki/Kibibyte
> 
> Searching around I only see knightslanding using MiB but it seems to
> be using it in the 1000^2 case which probably means it should be MB:
> knightslanding/uncore-memory.json:        "ScaleUnit": "6.4e-05MiB"
> 
> Given there is some confusion I wonder if it makes sense to just make
> this 0.015625B and then we have a utility function that selects the
> best unit for "bytes" with config options similar to --big-num?
> 
> Thanks,
> Ian
> 
> > +    },
> > +    {
> > +       "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@",
> > +       "MetricName" : "mcs23-read",
> > +       "MetricGroup" : "memory_bw",
> > +       "ScaleUnit": "6.1e-5MB"
> > +    },
> > +    {
> > +       "MetricExpr" : "nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@",
> > +       "MetricName" : "mcs01-write",
> > +       "MetricGroup" : "memory_bw",
> > +       "ScaleUnit": "6.1e-5MB"
> > +    },
> > +    {
> > +       "MetricExpr" : "nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@",
> > +       "MetricName" : "mcs23-write",
> > +       "MetricGroup" : "memory-bandwidth",
> > +       "ScaleUnit": "6.1e-5MB"
> > +    },
> > +    {
> > +       "MetricExpr" : "nest_powerbus0_imc@PM_PB_CYC@",
> > +       "MetricName" : "powerbus_freq",
> > +       "ScaleUnit": "1e-9GHz"
> > +    },
> > +    {
> > +       "MetricExpr" : "(nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_RD_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_RD_DISP_PORT23@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT01@ + nest_mcs01_imc@PM_MCS01_128B_WR_DISP_PORT23@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT01@ + nest_mcs23_imc@PM_MCS23_128B_WR_DISP_PORT23@)",
> > +       "MetricName" : "Memory-bandwidth-MCS",
> > +       "MetricGroup" : "memory_bw",
> > +       "ScaleUnit": "6.1e-5MB"
> >      }
> >  ]
> > --
> > 2.17.1
> >

-- 

- Arnaldo

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

end of thread, other threads:[~2020-07-06 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03  6:56 [PATCH] perf/tools/pmu-events/powerpc: Added nest imc metric events Kajol Jain
2020-07-06  1:30 ` Ian Rogers
2020-07-06 12:38   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).