aboutsummaryrefslogtreecommitdiffstats
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,
106 if (he == NULL) 106 if (he == NULL)
107 goto out_free_syms; 107 goto out_free_syms;
108 err = 0; 108 err = 0;
109 if (symbol_conf.use_callchain) 109 if (symbol_conf.use_callchain) {
110 err = append_chain(he->callchain, data->callchain, syms); 110 err = append_chain(he->callchain, data->callchain, syms);
111 if (err)
112 goto out_free_syms;
113 }
114 /*
115 * Only in the newt browser we are doing integrated annotation,
116 * so we don't allocated the extra space needed because the stdio
117 * code will not use it.
118 */
119 if (use_browser)
120 err = hist_entry__inc_addr_samples(he, al->addr);
111out_free_syms: 121out_free_syms:
112 free(syms); 122 free(syms);
113 return err; 123 return err;
@@ -301,10 +311,7 @@ static int __cmd_report(void)
301 hists__collapse_resort(hists); 311 hists__collapse_resort(hists);
302 hists__output_resort(hists); 312 hists__output_resort(hists);
303 if (use_browser) 313 if (use_browser)
304 perf_session__browse_hists(&hists->entries, 314 hists__browse(hists, help, input_name);
305 hists->nr_entries,
306 hists->stats.total, help,
307 input_name);
308 else { 315 else {
309 if (rb_first(&session->hists.entries) == 316 if (rb_first(&session->hists.entries) ==
310 rb_last(&session->hists.entries)) 317 rb_last(&session->hists.entries))
@@ -461,6 +468,13 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
461 468
462 if (strcmp(input_name, "-") != 0) 469 if (strcmp(input_name, "-") != 0)
463 setup_browser(); 470 setup_browser();
471 /*
472 * Only in the newt browser we are doing integrated annotation,
473 * so don't allocate extra space that won't be used in the stdio
474 * implementation.
475 */
476 if (use_browser)
477 symbol_conf.priv_size = sizeof(struct sym_priv);
464 478
465 if (symbol__init() < 0) 479 if (symbol__init() < 0)
466 return -1; 480 return -1;