summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index d7c75291e788..04de3387de3f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -106,8 +106,18 @@ static int perf_session__add_hist_entry(struct perf_session *self,
if (he == NULL)
goto out_free_syms;
err = 0;
- if (symbol_conf.use_callchain)
+ if (symbol_conf.use_callchain) {
err = append_chain(he->callchain, data->callchain, syms);
+ if (err)
+ goto out_free_syms;
+ }
+ /*
+ * Only in the newt browser we are doing integrated annotation,
+ * so we don't allocated the extra space needed because the stdio
+ * code will not use it.
+ */
+ if (use_browser)
+ err = hist_entry__inc_addr_samples(he, al->addr);
out_free_syms:
free(syms);
return err;
@@ -301,10 +311,7 @@ static int __cmd_report(void)
hists__collapse_resort(hists);
hists__output_resort(hists);
if (use_browser)
- perf_session__browse_hists(&hists->entries,
- hists->nr_entries,
- hists->stats.total, help,
- input_name);
+ hists__browse(hists, help, input_name);
else {
if (rb_first(&session->hists.entries) ==
rb_last(&session->hists.entries))
@@ -461,6 +468,13 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
if (strcmp(input_name, "-") != 0)
setup_browser();
+ /*
+ * Only in the newt browser we are doing integrated annotation,
+ * so don't allocate extra space that won't be used in the stdio
+ * implementation.
+ */
+ if (use_browser)
+ symbol_conf.priv_size = sizeof(struct sym_priv);
if (symbol__init() < 0)
return -1;