diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 3c53ec268fbc..02f985f3a396 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -113,14 +113,16 @@ static int report__add_mem_hist_entry(struct perf_tool *tool, struct addr_locati | |||
113 | if (!he) | 113 | if (!he) |
114 | return -ENOMEM; | 114 | return -ENOMEM; |
115 | 115 | ||
116 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | 116 | if (ui__has_annotation()) { |
117 | if (err) | 117 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); |
118 | goto out; | 118 | if (err) |
119 | goto out; | ||
119 | 120 | ||
120 | mx = he->mem_info; | 121 | mx = he->mem_info; |
121 | err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); | 122 | err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); |
122 | if (err) | 123 | if (err) |
123 | goto out; | 124 | goto out; |
125 | } | ||
124 | 126 | ||
125 | evsel->hists.stats.total_period += cost; | 127 | evsel->hists.stats.total_period += cost; |
126 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 128 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
@@ -164,14 +166,18 @@ static int report__add_branch_hist_entry(struct perf_tool *tool, struct addr_loc | |||
164 | he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, | 166 | he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, |
165 | 1, 1, 0); | 167 | 1, 1, 0); |
166 | if (he) { | 168 | if (he) { |
167 | bx = he->branch_info; | 169 | if (ui__has_annotation()) { |
168 | err = addr_map_symbol__inc_samples(&bx->from, evsel->idx); | 170 | bx = he->branch_info; |
169 | if (err) | 171 | err = addr_map_symbol__inc_samples(&bx->from, |
170 | goto out; | 172 | evsel->idx); |
171 | 173 | if (err) | |
172 | err = addr_map_symbol__inc_samples(&bx->to, evsel->idx); | 174 | goto out; |
173 | if (err) | 175 | |
174 | goto out; | 176 | err = addr_map_symbol__inc_samples(&bx->to, |
177 | evsel->idx); | ||
178 | if (err) | ||
179 | goto out; | ||
180 | } | ||
175 | 181 | ||
176 | evsel->hists.stats.total_period += 1; | 182 | evsel->hists.stats.total_period += 1; |
177 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 183 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
@@ -205,7 +211,9 @@ static int report__add_hist_entry(struct perf_tool *tool, struct perf_evsel *evs | |||
205 | if (err) | 211 | if (err) |
206 | goto out; | 212 | goto out; |
207 | 213 | ||
208 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | 214 | if (ui__has_annotation()) |
215 | err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | ||
216 | |||
209 | evsel->hists.stats.total_period += sample->period; | 217 | evsel->hists.stats.total_period += sample->period; |
210 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 218 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); |
211 | out: | 219 | out: |