aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-03-11 06:53:50 -0400
committerIngo Molnar <mingo@kernel.org>2014-03-11 06:53:50 -0400
commit0066f3b93e144762b409940fa37bb1cd36c1baf7 (patch)
tree0c99b2754fb16c2a787bc1d086bd6fb268b12b1a /tools/perf/builtin-report.c
parente65312fe868da53077780de618e213a53dc90d00 (diff)
parentb8ad0f912b93c23c34dfedc615a0eeba6ca29463 (diff)
Merge branch 'perf/urgent' into perf/core
Merge the latest fixes. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c40
1 files changed, 24 insertions, 16 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index d882b6f96411..c47bf586fcba 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -110,14 +110,16 @@ static int report__add_mem_hist_entry(struct report *rep, struct addr_location *
110 if (!he) 110 if (!he)
111 return -ENOMEM; 111 return -ENOMEM;
112 112
113 err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); 113 if (ui__has_annotation()) {
114 if (err) 114 err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
115 goto out; 115 if (err)
116 goto out;
116 117
117 mx = he->mem_info; 118 mx = he->mem_info;
118 err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); 119 err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx);
119 if (err) 120 if (err)
120 goto out; 121 goto out;
122 }
121 123
122 evsel->hists.stats.total_period += cost; 124 evsel->hists.stats.total_period += cost;
123 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); 125 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
@@ -159,14 +161,18 @@ static int report__add_branch_hist_entry(struct report *rep, struct addr_locatio
159 he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, 161 he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL,
160 1, 1, 0); 162 1, 1, 0);
161 if (he) { 163 if (he) {
162 bx = he->branch_info; 164 if (ui__has_annotation()) {
163 err = addr_map_symbol__inc_samples(&bx->from, evsel->idx); 165 bx = he->branch_info;
164 if (err) 166 err = addr_map_symbol__inc_samples(&bx->from,
165 goto out; 167 evsel->idx);
166 168 if (err)
167 err = addr_map_symbol__inc_samples(&bx->to, evsel->idx); 169 goto out;
168 if (err) 170
169 goto out; 171 err = addr_map_symbol__inc_samples(&bx->to,
172 evsel->idx);
173 if (err)
174 goto out;
175 }
170 176
171 evsel->hists.stats.total_period += 1; 177 evsel->hists.stats.total_period += 1;
172 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); 178 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
@@ -199,7 +205,9 @@ static int report__add_hist_entry(struct report *rep, struct perf_evsel *evsel,
199 if (err) 205 if (err)
200 goto out; 206 goto out;
201 207
202 err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); 208 if (ui__has_annotation())
209 err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
210
203 evsel->hists.stats.total_period += sample->period; 211 evsel->hists.stats.total_period += sample->period;
204 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); 212 hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE);
205out: 213out: