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.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 25f83d5d66fd..8cf8e66ba594 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -115,7 +115,8 @@ static int perf_report__add_mem_hist_entry(struct perf_tool *tool,
115 * and this is indirectly achieved by passing period=weight here 115 * and this is indirectly achieved by passing period=weight here
116 * and the he_stat__add_period() function. 116 * and the he_stat__add_period() function.
117 */ 117 */
118 he = __hists__add_mem_entry(&evsel->hists, al, parent, mi, cost, cost); 118 he = __hists__add_entry(&evsel->hists, al, parent, NULL, mi,
119 cost, cost, 0);
119 if (!he) 120 if (!he)
120 return -ENOMEM; 121 return -ENOMEM;
121 122
@@ -200,12 +201,16 @@ static int perf_report__add_branch_hist_entry(struct perf_tool *tool,
200 201
201 err = -ENOMEM; 202 err = -ENOMEM;
202 203
204 /* overwrite the 'al' to branch-to info */
205 al->map = bi[i].to.map;
206 al->sym = bi[i].to.sym;
207 al->addr = bi[i].to.addr;
203 /* 208 /*
204 * The report shows the percentage of total branches captured 209 * The report shows the percentage of total branches captured
205 * and not events sampled. Thus we use a pseudo period of 1. 210 * and not events sampled. Thus we use a pseudo period of 1.
206 */ 211 */
207 he = __hists__add_branch_entry(&evsel->hists, al, parent, 212 he = __hists__add_entry(&evsel->hists, al, parent, &bi[i], NULL,
208 &bi[i], 1, 1); 213 1, 1, 0);
209 if (he) { 214 if (he) {
210 struct annotation *notes; 215 struct annotation *notes;
211 bx = he->branch_info; 216 bx = he->branch_info;
@@ -266,8 +271,9 @@ static int perf_evsel__add_hist_entry(struct perf_tool *tool,
266 return err; 271 return err;
267 } 272 }
268 273
269 he = __hists__add_entry(&evsel->hists, al, parent, sample->period, 274 he = __hists__add_entry(&evsel->hists, al, parent, NULL, NULL,
270 sample->weight, sample->transaction); 275 sample->period, sample->weight,
276 sample->transaction);
271 if (he == NULL) 277 if (he == NULL)
272 return -ENOMEM; 278 return -ENOMEM;
273 279