All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-04 18:23 ` Ian Rogers
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-04 18:23 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel

A metric is default by having "Default" within its groups. The default
metricgroup name needn't be set and this can result in segv in
default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
that assume it has a value when there is a Default metric group. To
avoid the segv initialize the value to "".

Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/metricgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 0484736d9fe4..ca3e0404f187 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -225,7 +225,7 @@ static struct metric *metric__new(const struct pmu_metric *pm,
 
 	m->pmu = pm->pmu ?: "cpu";
 	m->metric_name = pm->metric_name;
-	m->default_metricgroup_name = pm->default_metricgroup_name;
+	m->default_metricgroup_name = pm->default_metricgroup_name ?: "";
 	m->modifier = NULL;
 	if (modifier) {
 		m->modifier = strdup(modifier);
-- 
2.43.0.rc2.451.g8631bc7472-goog


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

* [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-04 18:23 ` Ian Rogers
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-04 18:23 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel

A metric is default by having "Default" within its groups. The default
metricgroup name needn't be set and this can result in segv in
default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
that assume it has a value when there is a Default metric group. To
avoid the segv initialize the value to "".

Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/metricgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 0484736d9fe4..ca3e0404f187 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -225,7 +225,7 @@ static struct metric *metric__new(const struct pmu_metric *pm,
 
 	m->pmu = pm->pmu ?: "cpu";
 	m->metric_name = pm->metric_name;
-	m->default_metricgroup_name = pm->default_metricgroup_name;
+	m->default_metricgroup_name = pm->default_metricgroup_name ?: "";
 	m->modifier = NULL;
 	if (modifier) {
 		m->modifier = strdup(modifier);
-- 
2.43.0.rc2.451.g8631bc7472-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 2/2] perf vendor events arm64: Fix default AmpereOne metrics
  2023-12-04 18:23 ` Ian Rogers
@ 2023-12-04 18:23   ` Ian Rogers
  -1 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-04 18:23 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel

Add default metric group name for TopdownL1 metrics.

Fixes: 59faeaf80d02 ("perf vendor events arm64: Fix for AmpereOne metrics")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
index e2848a9d4848..afcdad58ef89 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
@@ -231,6 +231,7 @@
         "MetricName": "slots_lost_misspeculation_fraction",
         "MetricExpr": "100 * ((OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots lost due to misspeculation",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "ScaleUnit": "1percent of slots"
     },
@@ -238,6 +239,7 @@
         "MetricName": "retired_fraction",
         "MetricExpr": "100 * (OP_RETIRED / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots retiring, useful work",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
 	"ScaleUnit": "1percent of slots"
     },
-- 
2.43.0.rc2.451.g8631bc7472-goog


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

* [PATCH v1 2/2] perf vendor events arm64: Fix default AmpereOne metrics
@ 2023-12-04 18:23   ` Ian Rogers
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-04 18:23 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel

Add default metric group name for TopdownL1 metrics.

Fixes: 59faeaf80d02 ("perf vendor events arm64: Fix for AmpereOne metrics")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
index e2848a9d4848..afcdad58ef89 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
@@ -231,6 +231,7 @@
         "MetricName": "slots_lost_misspeculation_fraction",
         "MetricExpr": "100 * ((OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots lost due to misspeculation",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "ScaleUnit": "1percent of slots"
     },
@@ -238,6 +239,7 @@
         "MetricName": "retired_fraction",
         "MetricExpr": "100 * (OP_RETIRED / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots retiring, useful work",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
 	"ScaleUnit": "1percent of slots"
     },
-- 
2.43.0.rc2.451.g8631bc7472-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-04 18:23 ` Ian Rogers
@ 2023-12-04 22:44   ` Ilkka Koskinen
  -1 siblings, 0 replies; 24+ messages in thread
From: Ilkka Koskinen @ 2023-12-04 22:44 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel



On Mon, 4 Dec 2023, Ian Rogers wrote:
> A metric is default by having "Default" within its groups. The default
> metricgroup name needn't be set and this can result in segv in
> default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> that assume it has a value when there is a Default metric group. To
> avoid the segv initialize the value to "".
>
> Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> Signed-off-by: Ian Rogers <irogers@google.com>

Thanks! I was going to look for the bug but got pulled to other 
tasks. The patch looks good to me and I tested it successfully on 
AmpereOne.

   Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>


Cheers, Ilkka

> ---
> tools/perf/util/metricgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 0484736d9fe4..ca3e0404f187 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -225,7 +225,7 @@ static struct metric *metric__new(const struct pmu_metric *pm,
>
> 	m->pmu = pm->pmu ?: "cpu";
> 	m->metric_name = pm->metric_name;
> -	m->default_metricgroup_name = pm->default_metricgroup_name;
> +	m->default_metricgroup_name = pm->default_metricgroup_name ?: "";
> 	m->modifier = NULL;
> 	if (modifier) {
> 		m->modifier = strdup(modifier);
> -- 
> 2.43.0.rc2.451.g8631bc7472-goog
>
>

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-04 22:44   ` Ilkka Koskinen
  0 siblings, 0 replies; 24+ messages in thread
From: Ilkka Koskinen @ 2023-12-04 22:44 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Ilkka Koskinen, Kan Liang, Kajol Jain,
	linux-arm-kernel, linux-perf-users, linux-kernel



On Mon, 4 Dec 2023, Ian Rogers wrote:
> A metric is default by having "Default" within its groups. The default
> metricgroup name needn't be set and this can result in segv in
> default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> that assume it has a value when there is a Default metric group. To
> avoid the segv initialize the value to "".
>
> Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> Signed-off-by: Ian Rogers <irogers@google.com>

Thanks! I was going to look for the bug but got pulled to other 
tasks. The patch looks good to me and I tested it successfully on 
AmpereOne.

   Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>


Cheers, Ilkka

> ---
> tools/perf/util/metricgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 0484736d9fe4..ca3e0404f187 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -225,7 +225,7 @@ static struct metric *metric__new(const struct pmu_metric *pm,
>
> 	m->pmu = pm->pmu ?: "cpu";
> 	m->metric_name = pm->metric_name;
> -	m->default_metricgroup_name = pm->default_metricgroup_name;
> +	m->default_metricgroup_name = pm->default_metricgroup_name ?: "";
> 	m->modifier = NULL;
> 	if (modifier) {
> 		m->modifier = strdup(modifier);
> -- 
> 2.43.0.rc2.451.g8631bc7472-goog
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-04 22:44   ` Ilkka Koskinen
@ 2023-12-05  3:33     ` Namhyung Kim
  -1 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05  3:33 UTC (permalink / raw)
  To: Ilkka Koskinen
  Cc: Ian Rogers, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

Hello,

On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen
<ilkka@os.amperecomputing.com> wrote:
>
>
>
> On Mon, 4 Dec 2023, Ian Rogers wrote:
> > A metric is default by having "Default" within its groups. The default
> > metricgroup name needn't be set and this can result in segv in
> > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > that assume it has a value when there is a Default metric group. To
> > avoid the segv initialize the value to "".
> >
> > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > Signed-off-by: Ian Rogers <irogers@google.com>
>
> Thanks! I was going to look for the bug but got pulled to other
> tasks. The patch looks good to me and I tested it successfully on
> AmpereOne.
>
>    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>

Looks like it needs to go through perf-tools for v6.7.
Ian, do you think this one is enough?

Thanks,
Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05  3:33     ` Namhyung Kim
  0 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05  3:33 UTC (permalink / raw)
  To: Ilkka Koskinen
  Cc: Ian Rogers, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

Hello,

On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen
<ilkka@os.amperecomputing.com> wrote:
>
>
>
> On Mon, 4 Dec 2023, Ian Rogers wrote:
> > A metric is default by having "Default" within its groups. The default
> > metricgroup name needn't be set and this can result in segv in
> > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > that assume it has a value when there is a Default metric group. To
> > avoid the segv initialize the value to "".
> >
> > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > Signed-off-by: Ian Rogers <irogers@google.com>
>
> Thanks! I was going to look for the bug but got pulled to other
> tasks. The patch looks good to me and I tested it successfully on
> AmpereOne.
>
>    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>

Looks like it needs to go through perf-tools for v6.7.
Ian, do you think this one is enough?

Thanks,
Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05  3:33     ` Namhyung Kim
@ 2023-12-05  4:25       ` Ian Rogers
  -1 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-05  4:25 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

On Mon, Dec 4, 2023 at 7:33 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen
> <ilkka@os.amperecomputing.com> wrote:
> >
> >
> >
> > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > A metric is default by having "Default" within its groups. The default
> > > metricgroup name needn't be set and this can result in segv in
> > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > that assume it has a value when there is a Default metric group. To
> > > avoid the segv initialize the value to "".
> > >
> > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > Signed-off-by: Ian Rogers <irogers@google.com>
> >
> > Thanks! I was going to look for the bug but got pulled to other
> > tasks. The patch looks good to me and I tested it successfully on
> > AmpereOne.
> >
> >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>
> Looks like it needs to go through perf-tools for v6.7.
> Ian, do you think this one is enough?

From a user's pov the json fix is nicer as otherwise perf stat output
for the relevant metrics lacks a heading on the left. This fix is
smaller. I'm easy about which to take :-)

Thanks,
Ian

> Thanks,
> Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05  4:25       ` Ian Rogers
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-05  4:25 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

On Mon, Dec 4, 2023 at 7:33 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen
> <ilkka@os.amperecomputing.com> wrote:
> >
> >
> >
> > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > A metric is default by having "Default" within its groups. The default
> > > metricgroup name needn't be set and this can result in segv in
> > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > that assume it has a value when there is a Default metric group. To
> > > avoid the segv initialize the value to "".
> > >
> > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > Signed-off-by: Ian Rogers <irogers@google.com>
> >
> > Thanks! I was going to look for the bug but got pulled to other
> > tasks. The patch looks good to me and I tested it successfully on
> > AmpereOne.
> >
> >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>
> Looks like it needs to go through perf-tools for v6.7.
> Ian, do you think this one is enough?

From a user's pov the json fix is nicer as otherwise perf stat output
for the relevant metrics lacks a heading on the left. This fix is
smaller. I'm easy about which to take :-)

Thanks,
Ian

> Thanks,
> Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-04 22:44   ` Ilkka Koskinen
@ 2023-12-05 15:19     ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 15:19 UTC (permalink / raw)
  To: Ilkka Koskinen
  Cc: Ian Rogers, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

Em Mon, Dec 04, 2023 at 02:44:54PM -0800, Ilkka Koskinen escreveu:
> 
> 
> On Mon, 4 Dec 2023, Ian Rogers wrote:
> > A metric is default by having "Default" within its groups. The default
> > metricgroup name needn't be set and this can result in segv in
> > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > that assume it has a value when there is a Default metric group. To
> > avoid the segv initialize the value to "".
> > 
> > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> Thanks! I was going to look for the bug but got pulled to other tasks. The
> patch looks good to me and I tested it successfully on AmpereOne.
> 
>   Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>

Thanks, applied to perf-tools-next.

- Arnaldo


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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 15:19     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 15:19 UTC (permalink / raw)
  To: Ilkka Koskinen
  Cc: Ian Rogers, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Adrian Hunter,
	Kan Liang, Kajol Jain, linux-arm-kernel, linux-perf-users,
	linux-kernel

Em Mon, Dec 04, 2023 at 02:44:54PM -0800, Ilkka Koskinen escreveu:
> 
> 
> On Mon, 4 Dec 2023, Ian Rogers wrote:
> > A metric is default by having "Default" within its groups. The default
> > metricgroup name needn't be set and this can result in segv in
> > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > that assume it has a value when there is a Default metric group. To
> > avoid the segv initialize the value to "".
> > 
> > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > Signed-off-by: Ian Rogers <irogers@google.com>
> 
> Thanks! I was going to look for the bug but got pulled to other tasks. The
> patch looks good to me and I tested it successfully on AmpereOne.
> 
>   Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>

Thanks, applied to perf-tools-next.

- Arnaldo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05  3:33     ` Namhyung Kim
@ 2023-12-05 15:51       ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 15:51 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > A metric is default by having "Default" within its groups. The default
> > > metricgroup name needn't be set and this can result in segv in
> > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > that assume it has a value when there is a Default metric group. To
> > > avoid the segv initialize the value to "".

> > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > Signed-off-by: Ian Rogers <irogers@google.com>

> > Thanks! I was going to look for the bug but got pulled to other
> > tasks. The patch looks good to me and I tested it successfully on
> > AmpereOne.

> >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
 
> Looks like it needs to go through perf-tools for v6.7.
> Ian, do you think this one is enough?

So I had this on my local perf-tools-next, removed now, I also have some
other fixes by Ian on the tmp.perf-tools-next, please let me know what
you guys decide to have in perf-tools for v6.7 so that I can remove it
from there.

- Arnaldo

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 15:51       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 15:51 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > A metric is default by having "Default" within its groups. The default
> > > metricgroup name needn't be set and this can result in segv in
> > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > that assume it has a value when there is a Default metric group. To
> > > avoid the segv initialize the value to "".

> > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > Signed-off-by: Ian Rogers <irogers@google.com>

> > Thanks! I was going to look for the bug but got pulled to other
> > tasks. The patch looks good to me and I tested it successfully on
> > AmpereOne.

> >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
 
> Looks like it needs to go through perf-tools for v6.7.
> Ian, do you think this one is enough?

So I had this on my local perf-tools-next, removed now, I also have some
other fixes by Ian on the tmp.perf-tools-next, please let me know what
you guys decide to have in perf-tools for v6.7 so that I can remove it
from there.

- Arnaldo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05 15:51       ` Arnaldo Carvalho de Melo
@ 2023-12-05 17:24         ` Namhyung Kim
  -1 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 17:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Hi Arnaldo,

On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > A metric is default by having "Default" within its groups. The default
> > > > metricgroup name needn't be set and this can result in segv in
> > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > that assume it has a value when there is a Default metric group. To
> > > > avoid the segv initialize the value to "".
>
> > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > Signed-off-by: Ian Rogers <irogers@google.com>
>
> > > Thanks! I was going to look for the bug but got pulled to other
> > > tasks. The patch looks good to me and I tested it successfully on
> > > AmpereOne.
>
> > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>
> > Looks like it needs to go through perf-tools for v6.7.
> > Ian, do you think this one is enough?
>
> So I had this on my local perf-tools-next, removed now, I also have some
> other fixes by Ian on the tmp.perf-tools-next, please let me know what
> you guys decide to have in perf-tools for v6.7 so that I can remove it
> from there.

I think we need this one and the Ampere default-metric-group fix.

https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/

Also perf list JSON fix can go to v6.7.

https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/

Thanks,
Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 17:24         ` Namhyung Kim
  0 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 17:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Hi Arnaldo,

On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > A metric is default by having "Default" within its groups. The default
> > > > metricgroup name needn't be set and this can result in segv in
> > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > that assume it has a value when there is a Default metric group. To
> > > > avoid the segv initialize the value to "".
>
> > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > Signed-off-by: Ian Rogers <irogers@google.com>
>
> > > Thanks! I was going to look for the bug but got pulled to other
> > > tasks. The patch looks good to me and I tested it successfully on
> > > AmpereOne.
>
> > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>
> > Looks like it needs to go through perf-tools for v6.7.
> > Ian, do you think this one is enough?
>
> So I had this on my local perf-tools-next, removed now, I also have some
> other fixes by Ian on the tmp.perf-tools-next, please let me know what
> you guys decide to have in perf-tools for v6.7 so that I can remove it
> from there.

I think we need this one and the Ampere default-metric-group fix.

https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/

Also perf list JSON fix can go to v6.7.

https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/

Thanks,
Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05 17:24         ` Namhyung Kim
@ 2023-12-05 18:48           ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 18:48 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > A metric is default by having "Default" within its groups. The default
> > > > > metricgroup name needn't be set and this can result in segv in
> > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > that assume it has a value when there is a Default metric group. To
> > > > > avoid the segv initialize the value to "".
> >
> > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> >
> > > > Thanks! I was going to look for the bug but got pulled to other
> > > > tasks. The patch looks good to me and I tested it successfully on
> > > > AmpereOne.
> >
> > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> >
> > > Looks like it needs to go through perf-tools for v6.7.
> > > Ian, do you think this one is enough?
> >
> > So I had this on my local perf-tools-next, removed now, I also have some
> > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > from there.
> 
> I think we need this one and the Ampere default-metric-group fix.
> 
> https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> 
> Also perf list JSON fix can go to v6.7.
> 
> https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/

Ok, removed both, please augment the later description to:

"perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"

The original description was vague, improving it a bit like that helps
when just looking at the output of "git log --oneline".

Thanks,

- Arnaldo


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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 18:48           ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 24+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-12-05 18:48 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> Hi Arnaldo,
> 
> On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > A metric is default by having "Default" within its groups. The default
> > > > > metricgroup name needn't be set and this can result in segv in
> > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > that assume it has a value when there is a Default metric group. To
> > > > > avoid the segv initialize the value to "".
> >
> > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> >
> > > > Thanks! I was going to look for the bug but got pulled to other
> > > > tasks. The patch looks good to me and I tested it successfully on
> > > > AmpereOne.
> >
> > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> >
> > > Looks like it needs to go through perf-tools for v6.7.
> > > Ian, do you think this one is enough?
> >
> > So I had this on my local perf-tools-next, removed now, I also have some
> > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > from there.
> 
> I think we need this one and the Ampere default-metric-group fix.
> 
> https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> 
> Also perf list JSON fix can go to v6.7.
> 
> https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/

Ok, removed both, please augment the later description to:

"perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"

The original description was vague, improving it a bit like that helps
when just looking at the output of "git log --oneline".

Thanks,

- Arnaldo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05 18:48           ` Arnaldo Carvalho de Melo
@ 2023-12-05 19:10             ` Namhyung Kim
  -1 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 19:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> > Hi Arnaldo,
> >
> > On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > >
> > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > > A metric is default by having "Default" within its groups. The default
> > > > > > metricgroup name needn't be set and this can result in segv in
> > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > > that assume it has a value when there is a Default metric group. To
> > > > > > avoid the segv initialize the value to "".
> > >
> > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > >
> > > > > Thanks! I was going to look for the bug but got pulled to other
> > > > > tasks. The patch looks good to me and I tested it successfully on
> > > > > AmpereOne.
> > >
> > > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> > >
> > > > Looks like it needs to go through perf-tools for v6.7.
> > > > Ian, do you think this one is enough?
> > >
> > > So I had this on my local perf-tools-next, removed now, I also have some
> > > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > > from there.
> >
> > I think we need this one and the Ampere default-metric-group fix.
> >
> > https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> >
> > Also perf list JSON fix can go to v6.7.
> >
> > https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/
>
> Ok, removed both, please augment the later description to:
>
> "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
>
> The original description was vague, improving it a bit like that helps
> when just looking at the output of "git log --oneline".

Done and pushed to tmp.perf-tools!

Thanks,
Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 19:10             ` Namhyung Kim
  0 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 19:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ilkka Koskinen, Ian Rogers, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	Kajol Jain, linux-arm-kernel, linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> > Hi Arnaldo,
> >
> > On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > >
> > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > > A metric is default by having "Default" within its groups. The default
> > > > > > metricgroup name needn't be set and this can result in segv in
> > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > > that assume it has a value when there is a Default metric group. To
> > > > > > avoid the segv initialize the value to "".
> > >
> > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > >
> > > > > Thanks! I was going to look for the bug but got pulled to other
> > > > > tasks. The patch looks good to me and I tested it successfully on
> > > > > AmpereOne.
> > >
> > > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> > >
> > > > Looks like it needs to go through perf-tools for v6.7.
> > > > Ian, do you think this one is enough?
> > >
> > > So I had this on my local perf-tools-next, removed now, I also have some
> > > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > > from there.
> >
> > I think we need this one and the Ampere default-metric-group fix.
> >
> > https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> >
> > Also perf list JSON fix can go to v6.7.
> >
> > https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/
>
> Ok, removed both, please augment the later description to:
>
> "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
>
> The original description was vague, improving it a bit like that helps
> when just looking at the output of "git log --oneline".

Done and pushed to tmp.perf-tools!

Thanks,
Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05 19:10             ` Namhyung Kim
@ 2023-12-05 19:14               ` Ian Rogers
  -1 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-05 19:14 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ilkka Koskinen, John Garry,
	Will Deacon, James Clark, Mike Leach, Leo Yan, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Adrian Hunter, Kan Liang, Kajol Jain, linux-arm-kernel,
	linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 11:11 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> > > Hi Arnaldo,
> > >
> > > On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > >
> > > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > > > A metric is default by having "Default" within its groups. The default
> > > > > > > metricgroup name needn't be set and this can result in segv in
> > > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > > > that assume it has a value when there is a Default metric group. To
> > > > > > > avoid the segv initialize the value to "".
> > > >
> > > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > > >
> > > > > > Thanks! I was going to look for the bug but got pulled to other
> > > > > > tasks. The patch looks good to me and I tested it successfully on
> > > > > > AmpereOne.
> > > >
> > > > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> > > >
> > > > > Looks like it needs to go through perf-tools for v6.7.
> > > > > Ian, do you think this one is enough?
> > > >
> > > > So I had this on my local perf-tools-next, removed now, I also have some
> > > > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > > > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > > > from there.
> > >
> > > I think we need this one and the Ampere default-metric-group fix.
> > >
> > > https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> > >
> > > Also perf list JSON fix can go to v6.7.
> > >
> > > https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/
> >
> > Ok, removed both, please augment the later description to:
> >
> > "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
> >
> > The original description was vague, improving it a bit like that helps
> > when just looking at the output of "git log --oneline".
>
> Done and pushed to tmp.perf-tools!

Thanks Namhyung, there was a typo in Arnaldo's commit message
"s/fuplicate/duplicate/" could you fix?

Ian

> Thanks,
> Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 19:14               ` Ian Rogers
  0 siblings, 0 replies; 24+ messages in thread
From: Ian Rogers @ 2023-12-05 19:14 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Ilkka Koskinen, John Garry,
	Will Deacon, James Clark, Mike Leach, Leo Yan, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Adrian Hunter, Kan Liang, Kajol Jain, linux-arm-kernel,
	linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 11:11 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
> <acme@kernel.org> wrote:
> >
> > Em Tue, Dec 05, 2023 at 09:24:42AM -0800, Namhyung Kim escreveu:
> > > Hi Arnaldo,
> > >
> > > On Tue, Dec 5, 2023 at 7:51 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > >
> > > > Em Mon, Dec 04, 2023 at 07:33:18PM -0800, Namhyung Kim escreveu:
> > > > > On Mon, Dec 4, 2023 at 2:45 PM Ilkka Koskinen <ilkka@os.amperecomputing.com> wrote:
> > > > > > On Mon, 4 Dec 2023, Ian Rogers wrote:
> > > > > > > A metric is default by having "Default" within its groups. The default
> > > > > > > metricgroup name needn't be set and this can result in segv in
> > > > > > > default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
> > > > > > > that assume it has a value when there is a Default metric group. To
> > > > > > > avoid the segv initialize the value to "".
> > > >
> > > > > > > Fixes: 1c0e47956a8e ("perf metrics: Sort the Default metricgroup")
> > > > > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > > >
> > > > > > Thanks! I was going to look for the bug but got pulled to other
> > > > > > tasks. The patch looks good to me and I tested it successfully on
> > > > > > AmpereOne.
> > > >
> > > > > >    Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> > > >
> > > > > Looks like it needs to go through perf-tools for v6.7.
> > > > > Ian, do you think this one is enough?
> > > >
> > > > So I had this on my local perf-tools-next, removed now, I also have some
> > > > other fixes by Ian on the tmp.perf-tools-next, please let me know what
> > > > you guys decide to have in perf-tools for v6.7 so that I can remove it
> > > > from there.
> > >
> > > I think we need this one and the Ampere default-metric-group fix.
> > >
> > > https://lore.kernel.org/r/20231201021550.1109196-2-ilkka@os.amperecomputing.com/
> > >
> > > Also perf list JSON fix can go to v6.7.
> > >
> > > https://lore.kernel.org/r/20231129213428.2227448-2-irogers@google.com/
> >
> > Ok, removed both, please augment the later description to:
> >
> > "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
> >
> > The original description was vague, improving it a bit like that helps
> > when just looking at the output of "git log --oneline".
>
> Done and pushed to tmp.perf-tools!

Thanks Namhyung, there was a typo in Arnaldo's commit message
"s/fuplicate/duplicate/" could you fix?

Ian

> Thanks,
> Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
  2023-12-05 19:14               ` Ian Rogers
@ 2023-12-05 19:17                 ` Namhyung Kim
  -1 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 19:17 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Arnaldo Carvalho de Melo, Ilkka Koskinen, John Garry,
	Will Deacon, James Clark, Mike Leach, Leo Yan, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Adrian Hunter, Kan Liang, Kajol Jain, linux-arm-kernel,
	linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 11:15 AM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, Dec 5, 2023 at 11:11 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
> > <acme@kernel.org> wrote:

> > > "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
> > >
> > > The original description was vague, improving it a bit like that helps
> > > when just looking at the output of "git log --oneline".
> >
> > Done and pushed to tmp.perf-tools!
>
> Thanks Namhyung, there was a typo in Arnaldo's commit message
> "s/fuplicate/duplicate/" could you fix?

Oops, fixed now.  Thanks for checking.
Namhyung

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

* Re: [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set
@ 2023-12-05 19:17                 ` Namhyung Kim
  0 siblings, 0 replies; 24+ messages in thread
From: Namhyung Kim @ 2023-12-05 19:17 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Arnaldo Carvalho de Melo, Ilkka Koskinen, John Garry,
	Will Deacon, James Clark, Mike Leach, Leo Yan, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Adrian Hunter, Kan Liang, Kajol Jain, linux-arm-kernel,
	linux-perf-users, linux-kernel

On Tue, Dec 5, 2023 at 11:15 AM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, Dec 5, 2023 at 11:11 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Tue, Dec 5, 2023 at 10:48 AM Arnaldo Carvalho de Melo
> > <acme@kernel.org> wrote:

> > > "perf list: Fix JSON segfault by setting the used skip_fuplicate_pmus callback"
> > >
> > > The original description was vague, improving it a bit like that helps
> > > when just looking at the output of "git log --oneline".
> >
> > Done and pushed to tmp.perf-tools!
>
> Thanks Namhyung, there was a typo in Arnaldo's commit message
> "s/fuplicate/duplicate/" could you fix?

Oops, fixed now.  Thanks for checking.
Namhyung

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-12-05 19:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 18:23 [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set Ian Rogers
2023-12-04 18:23 ` Ian Rogers
2023-12-04 18:23 ` [PATCH v1 2/2] perf vendor events arm64: Fix default AmpereOne metrics Ian Rogers
2023-12-04 18:23   ` Ian Rogers
2023-12-04 22:44 ` [PATCH v1 1/2] perf metrics: Avoid segv if default metricgroup isn't set Ilkka Koskinen
2023-12-04 22:44   ` Ilkka Koskinen
2023-12-05  3:33   ` Namhyung Kim
2023-12-05  3:33     ` Namhyung Kim
2023-12-05  4:25     ` Ian Rogers
2023-12-05  4:25       ` Ian Rogers
2023-12-05 15:51     ` Arnaldo Carvalho de Melo
2023-12-05 15:51       ` Arnaldo Carvalho de Melo
2023-12-05 17:24       ` Namhyung Kim
2023-12-05 17:24         ` Namhyung Kim
2023-12-05 18:48         ` Arnaldo Carvalho de Melo
2023-12-05 18:48           ` Arnaldo Carvalho de Melo
2023-12-05 19:10           ` Namhyung Kim
2023-12-05 19:10             ` Namhyung Kim
2023-12-05 19:14             ` Ian Rogers
2023-12-05 19:14               ` Ian Rogers
2023-12-05 19:17               ` Namhyung Kim
2023-12-05 19:17                 ` Namhyung Kim
2023-12-05 15:19   ` Arnaldo Carvalho de Melo
2023-12-05 15:19     ` Arnaldo Carvalho de Melo

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.