aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorRoberto Agostino Vitillo <ravitillo@lbl.gov>2012-02-09 17:21:01 -0500
committerIngo Molnar <mingo@elte.hu>2012-03-09 02:26:04 -0500
commitb5387528f31d98acedf06e930554b563d87e2383 (patch)
tree0a8fff59cc7d1392d7adfbbc0f9beacc9ca6d20b /tools/perf/util/hist.h
parentd010b3326cf06b3406cdd88af16dcf4e4b6fec2e (diff)
perf tools: Add code to support PERF_SAMPLE_BRANCH_STACK
This patch adds: - ability to parse samples with PERF_SAMPLE_BRANCH_STACK - sort on branches (dso_from, symbol_from, dso_to, symbol_to, mispredict) - build histograms on branches Signed-off-by: Roberto Agostino Vitillo <ravitillo@lbl.gov> Signed-off-by: Stephane Eranian <eranian@google.com> Cc: peterz@infradead.org Cc: acme@redhat.com Cc: robert.richter@amd.com Cc: ming.m.lin@intel.com Cc: andi@firstfloor.org Cc: asharma@fb.com Cc: vweaver1@eecs.utk.edu Cc: khandual@linux.vnet.ibm.com Cc: dsahern@gmail.com Link: http://lkml.kernel.org/r/1328826068-11713-12-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 48e5acd1e862..9413f3e31fea 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -42,6 +42,11 @@ enum hist_column {
42 HISTC_COMM, 42 HISTC_COMM,
43 HISTC_PARENT, 43 HISTC_PARENT,
44 HISTC_CPU, 44 HISTC_CPU,
45 HISTC_MISPREDICT,
46 HISTC_SYMBOL_FROM,
47 HISTC_SYMBOL_TO,
48 HISTC_DSO_FROM,
49 HISTC_DSO_TO,
45 HISTC_NR_COLS, /* Last entry */ 50 HISTC_NR_COLS, /* Last entry */
46}; 51};
47 52
@@ -74,6 +79,12 @@ int hist_entry__snprintf(struct hist_entry *self, char *bf, size_t size,
74 struct hists *hists); 79 struct hists *hists);
75void hist_entry__free(struct hist_entry *); 80void hist_entry__free(struct hist_entry *);
76 81
82struct hist_entry *__hists__add_branch_entry(struct hists *self,
83 struct addr_location *al,
84 struct symbol *sym_parent,
85 struct branch_info *bi,
86 u64 period);
87
77void hists__output_resort(struct hists *self); 88void hists__output_resort(struct hists *self);
78void hists__output_resort_threaded(struct hists *hists); 89void hists__output_resort_threaded(struct hists *hists);
79void hists__collapse_resort(struct hists *self); 90void hists__collapse_resort(struct hists *self);