diff options
| author | Jiri Olsa <[email protected]> | 2017-10-11 15:01:39 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-11-13 12:40:00 +0000 |
| commit | 7e304557ead5b309d59807b2f05ed47f2c0076c6 (patch) | |
| tree | e5800975a0a43926db288a7fd4342ac31224e3f1 /tools/perf/util/annotate.h | |
| parent | perf annotate: Add annotated_source__purge function (diff) | |
| download | kernel-7e304557ead5b309d59807b2f05ed47f2c0076c6.tar.gz kernel-7e304557ead5b309d59807b2f05ed47f2c0076c6.zip | |
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 <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.h')
| -rw-r--r-- | tools/perf/util/annotate.h | 17 |
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); |
