perf annotate: Support multiple histograms in annotation
The perf annotate tool continues aggregating everything on just one histograms, but to support the top model add support for one histogram perf evsel in the evlist. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@ -118,8 +118,17 @@ static int perf_session__add_hist_entry(struct perf_session *session,
|
||||
* so we don't allocated the extra space needed because the stdio
|
||||
* code will not use it.
|
||||
*/
|
||||
if (use_browser > 0)
|
||||
err = hist_entry__inc_addr_samples(he, al->addr);
|
||||
if (al->sym != NULL && use_browser > 0) {
|
||||
/*
|
||||
* All aggregated on the first sym_hist.
|
||||
*/
|
||||
struct annotation *notes = symbol__annotation(he->ms.sym);
|
||||
if (notes->histograms == NULL &&
|
||||
symbol__alloc_hist(he->ms.sym, 1) < 0)
|
||||
err = -ENOMEM;
|
||||
else
|
||||
err = hist_entry__inc_addr_samples(he, 0, al->addr);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -349,7 +358,7 @@ static int __cmd_report(void)
|
||||
}
|
||||
|
||||
if (use_browser > 0)
|
||||
hists__tui_browse_tree(&session->hists_tree, help);
|
||||
hists__tui_browse_tree(&session->hists_tree, help, 0);
|
||||
else
|
||||
hists__tty_browse_tree(&session->hists_tree, help);
|
||||
|
||||
|
Reference in New Issue
Block a user