summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-10-11 17:01:37 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-13 09:39:59 -0300
commitc835e1914c4bcfdd41f43d270cafc6d8119d7782 (patch)
tree250f7eef4f1a04c99521de5df5459c5857b86bee /tools/perf/ui
parent5b12adc849be011fd6d99a16e39d83afee43c0a0 (diff)
downloadtalos-obmc-linux-c835e1914c4bcfdd41f43d270cafc6d8119d7782.tar.gz
talos-obmc-linux-c835e1914c4bcfdd41f43d270cafc6d8119d7782.zip
perf annotate: Add annotation_line__(new|delete) functions
Changing the way the annotation lines are allocated and adding annotation_line__(new|delete) functions to deal with this. Before the allocation schema was as follows: ----------------------------------------------------------- struct disasm_line | struct annotation_line | private space ----------------------------------------------------------- Where the private space is used in TUI code to store computed annotation data for events. The stdio code computes the data on the fly. The goal is to compute and store annotation line's data directly in the struct annotation_line itself, so this patch changes the line allocation schema as follows: ------------------------------------------------------------ privsize space | struct disasm_line | struct annotation_line ------------------------------------------------------------ Moving struct annotation_line to the end, because in following changes we will move here the non-fixed length event's data. 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-15-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r--tools/perf/ui/browsers/annotate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index cfde5a2ca3f4..7ca5ae625cc9 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -76,7 +76,9 @@ struct annotate_browser {
static inline struct browser_disasm_line *disasm_line__browser(struct disasm_line *dl)
{
- return (struct browser_disasm_line *)(dl + 1);
+ struct annotation_line *al = &dl->al;
+
+ return (void *) al - al->privsize;
}
static bool disasm_line__filter(struct ui_browser *browser __maybe_unused,
OpenPOWER on IntegriCloud