summaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-10-11 17:01:39 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-11-13 09:40:00 -0300
commit7e304557ead5b309d59807b2f05ed47f2c0076c6 (patch)
treee5800975a0a43926db288a7fd4342ac31224e3f1 /tools/perf/util/annotate.h
parentf8eb37bd7c33babc01d9c2e3074ce001eec6cfbb (diff)
perf annotate: Add samples into struct annotation_line
Add samples array into struct annotation_line to hold the annotation data. The data is populated in the following patches. 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-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r--tools/perf/util/annotate.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index cb60cafae1fb..55bdd9015f33 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -59,6 +59,16 @@ bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2);
struct annotation;
+struct sym_hist_entry {
+ u64 nr_samples;
+ u64 period;
+};
+
+struct annotation_data {
+ double percent;
+ struct sym_hist_entry he;
+};
+
struct annotation_line {
struct list_head node;
struct rb_node rb_node;
@@ -68,6 +78,8 @@ struct annotation_line {
float ipc;
u64 cycles;
size_t privsize;
+ int samples_nr;
+ struct annotation_data samples[0];
};
struct disasm_line {
@@ -88,11 +100,6 @@ static inline bool disasm_line__has_offset(const struct disasm_line *dl)
return dl->ops.target.offset_avail;
}
-struct sym_hist_entry {
- u64 nr_samples;
- u64 period;
-};
-
void disasm_line__free(struct disasm_line *dl);
struct annotation_line *
annotation_line__next(struct annotation_line *pos, struct list_head *head);