Ian Rogers 9dde12767a perf metrics: Avoid segv with --topdown for metrics without a group
Some metrics may not have a metric_group which can result in segvs
with "perf stat --topdown". Add a condition for the no metric_group
case.

Fixes: 1647cd5b8802698f ("perf stat: Implement --topdown using json metrics")
Reported-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230515224530.671331-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-05-16 15:21:30 -03:00
..
2023-04-04 16:41:57 -03:00
2023-04-04 16:41:57 -03:00
2022-01-12 17:01:38 -08:00
2023-04-04 16:41:57 -03:00
2022-06-28 12:05:25 -03:00
2023-04-04 16:41:57 -03:00
2023-03-14 08:29:46 -03:00
2022-10-04 08:55:21 -03:00
2023-02-19 08:10:25 -03:00
2021-04-29 10:30:58 -03:00
2023-04-04 16:41:57 -03:00
2021-08-11 09:35:44 -03:00
2023-03-13 17:42:27 -03:00
2023-05-10 12:35:02 -03:00
2023-01-23 10:00:47 -03:00
2023-03-13 17:42:27 -03:00
2023-03-20 19:28:21 -03:00
2021-11-07 12:27:38 -03:00
2021-02-03 13:10:44 -03:00
2023-04-04 13:23:59 -03:00
2021-07-15 17:30:22 -03:00
2023-04-19 12:57:53 -03:00
2023-04-19 12:57:53 -03:00
2023-04-19 12:57:53 -03:00
2023-04-19 10:53:01 -03:00
2023-03-13 17:42:27 -03:00
2023-04-06 21:40:28 -03:00
2023-04-06 21:40:28 -03:00
2022-12-14 15:28:18 -03:00
2023-03-20 19:28:21 -03:00
2020-10-14 13:34:26 -03:00
2021-02-17 15:15:06 -03:00
2022-06-23 11:54:22 -03:00
2022-10-04 08:55:20 -03:00
2023-04-10 19:20:53 -03:00
2023-04-10 19:21:31 -03:00
2023-04-04 16:41:57 -03:00