diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-03-11 11:53:50 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-03-11 11:53:50 +0100 |
commit | 0066f3b93e144762b409940fa37bb1cd36c1baf7 (patch) | |
tree | 0c99b2754fb16c2a787bc1d086bd6fb268b12b1a /tools/perf/builtin-report.c | |
parent | e65312fe868da53077780de618e213a53dc90d00 (diff) | |
parent | b8ad0f912b93c23c34dfedc615a0eeba6ca29463 (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.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index d882b6f9641..c47bf586fcb 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 * if (!he) return -ENOMEM; - err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); - if (err) - goto out; + if (ui__has_annotation()) { + err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); + if (err) + goto out; - mx = he->mem_info; - err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); - if (err) - goto out; + mx = he->mem_info; + err = addr_map_symbol__inc_samples(&mx->daddr, evsel->idx); + if (err) + goto out; + } evsel->hists.stats.total_period += cost; 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 he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL, 1, 1, 0); if (he) { - bx = he->branch_info; - err = addr_map_symbol__inc_samples(&bx->from, evsel->idx); - if (err) - goto out; - - err = addr_map_symbol__inc_samples(&bx->to, evsel->idx); - if (err) - goto out; + if (ui__has_annotation()) { + bx = he->branch_info; + err = addr_map_symbol__inc_samples(&bx->from, + evsel->idx); + if (err) + goto out; + + err = addr_map_symbol__inc_samples(&bx->to, + evsel->idx); + if (err) + goto out; + } evsel->hists.stats.total_period += 1; 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, if (err) goto out; - err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); + if (ui__has_annotation()) + err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); + evsel->hists.stats.total_period += sample->period; hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); out: |