diff options
author | Jiri Olsa <jolsa@kernel.org> | 2017-10-11 11:01:38 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-11-13 07:40:00 -0500 |
commit | f8eb37bd7c33babc01d9c2e3074ce001eec6cfbb (patch) | |
tree | 194d92702b5e17198f3b1125a57bd77133ad936f /tools/perf/ui/browsers/annotate.c | |
parent | c835e1914c4bcfdd41f43d270cafc6d8119d7782 (diff) |
perf annotate: Add annotated_source__purge function
Mov disasm__purge() to annotated_source__purge() to make it work over a
generic struct annotation_line.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20171011150158.11895-16-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r-- | tools/perf/ui/browsers/annotate.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c index 7ca5ae625cc9..4c54d5e76008 100644 --- a/tools/perf/ui/browsers/annotate.c +++ b/tools/perf/ui/browsers/annotate.c | |||
@@ -1084,7 +1084,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, | |||
1084 | struct perf_evsel *evsel, | 1084 | struct perf_evsel *evsel, |
1085 | struct hist_browser_timer *hbt) | 1085 | struct hist_browser_timer *hbt) |
1086 | { | 1086 | { |
1087 | struct disasm_line *pos, *n; | 1087 | struct disasm_line *pos; |
1088 | struct annotation *notes; | 1088 | struct annotation *notes; |
1089 | size_t size; | 1089 | size_t size; |
1090 | struct map_symbol ms = { | 1090 | struct map_symbol ms = { |
@@ -1180,10 +1180,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, | |||
1180 | annotate_browser__update_addr_width(&browser); | 1180 | annotate_browser__update_addr_width(&browser); |
1181 | 1181 | ||
1182 | ret = annotate_browser__run(&browser, evsel, hbt); | 1182 | ret = annotate_browser__run(&browser, evsel, hbt); |
1183 | list_for_each_entry_safe(pos, n, ¬es->src->source, al.node) { | 1183 | |
1184 | list_del(&pos->al.node); | 1184 | annotated_source__purge(notes->src); |
1185 | disasm_line__free(pos); | ||
1186 | } | ||
1187 | 1185 | ||
1188 | out_free_offsets: | 1186 | out_free_offsets: |
1189 | free(browser.offsets); | 1187 | free(browser.offsets); |