aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2020-09-15 03:18:17 +0000
committerArnaldo Carvalho de Melo <[email protected]>2020-09-15 12:22:21 +0000
commit6f47ed6cd12a0ea9b55b19b5d6e4a3b490a97bdf (patch)
tree40ded442b07adb209ccbadac84005d8a91165579 /tools/perf/scripts/python/mem-phys-addr.py
parentperf metric: Free metric when it failed to resolve (diff)
downloadkernel-6f47ed6cd12a0ea9b55b19b5d6e4a3b490a97bdf.tar.gz
kernel-6f47ed6cd12a0ea9b55b19b5d6e4a3b490a97bdf.zip
perf metric: Do not free metric when failed to resolve
It's dangerous to free the original metric when it's called from resolve_metric() as it's already in the metric_list and might have other resources too. Instead, it'd better let them bail out and be released properly at the later stage. So add a check when it's called from metricgroup__add_metric() and release it. Also make sure that mp is set properly. Fixes: 83de0b7d535de ("perf metric: Collect referenced metrics in struct metric_ref_node") Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions