diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 3d67d6bf22cf..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); | ||
111 | out_free_syms: | 121 | out_free_syms: |
112 | free(syms); | 122 | free(syms); |
113 | return err; | 123 | return err; |
@@ -458,6 +468,13 @@ int cmd_report(int argc, const char **argv, const char *prefix __used) | |||
458 | 468 | ||
459 | if (strcmp(input_name, "-") != 0) | 469 | if (strcmp(input_name, "-") != 0) |
460 | 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); | ||
461 | 478 | ||
462 | if (symbol__init() < 0) | 479 | if (symbol__init() < 0) |
463 | return -1; | 480 | return -1; |