aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2024-04-04 17:57:12 +0000
committerArnaldo Carvalho de Melo <[email protected]>2024-04-08 20:43:20 +0000
commitcee9b86043d3690bc9154dabe13e7d53ca44ef9b (patch)
tree0bef638519d298a8c43c7db0449b892669ca471c /tools/perf/ui/browsers/annotate.c
parentperf annotate: Check annotation lines more efficiently (diff)
downloadkernel-cee9b86043d3690bc9154dabe13e7d53ca44ef9b.tar.gz
kernel-cee9b86043d3690bc9154dabe13e7d53ca44ef9b.zip
perf annotate: Get rid of offsets array
The struct annotated_source.offsets[] is to save pointers to annotation_line at each offset. We can use annotated_source__get_line() helper instead so let's get rid of the array. Signed-off-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index e72583f37972..c93da2ce727f 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -977,7 +977,7 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
dso->annotate_warned = true;
symbol__strerror_disassemble(ms, err, msg, sizeof(msg));
ui__error("Couldn't annotate %s:\n%s", sym->name, msg);
- goto out_free_offsets;
+ return -1;
}
}
@@ -996,8 +996,5 @@ int symbol__tui_annotate(struct map_symbol *ms, struct evsel *evsel,
if(not_annotated)
annotated_source__purge(notes->src);
-out_free_offsets:
- if(not_annotated)
- zfree(&notes->src->offsets);
return ret;
}