Lines Matching refs:pair
269 static double compute_delta(struct hist_entry *he, struct hist_entry *pair) in compute_delta() argument
272 double new_percent = period_percent(pair, pair->stat.period); in compute_delta()
274 pair->diff.period_ratio_delta = new_percent - old_percent; in compute_delta()
275 pair->diff.computed = true; in compute_delta()
276 return pair->diff.period_ratio_delta; in compute_delta()
279 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
282 double new_period = pair->stat.period; in compute_ratio()
284 pair->diff.computed = true; in compute_ratio()
285 pair->diff.period_ratio = new_period / old_period; in compute_ratio()
286 return pair->diff.period_ratio; in compute_ratio()
289 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
292 u64 new_period = pair->stat.period; in compute_wdiff()
294 pair->diff.computed = true; in compute_wdiff()
295 pair->diff.wdiff = new_period * compute_wdiff_w2 - in compute_wdiff()
298 return pair->diff.wdiff; in compute_wdiff()
301 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
305 u64 pair_total = pair->hists->stats.total_period; in formula_delta()
309 pair_total = pair->hists->stats.total_non_filtered_period; in formula_delta()
314 pair->stat.period, pair_total, in formula_delta()
318 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
322 double new_period = pair->stat.period; in formula_ratio()
327 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
331 u64 new_period = pair->stat.period; in formula_wdiff()
338 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
344 return formula_delta(he, pair, buf, size); in formula_fprintf()
346 return formula_ratio(he, pair, buf, size); in formula_fprintf()
348 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
493 struct hist_entry *pair; in get_pair_data() local
495 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
496 if (pair->hists == d->hists) in get_pair_data()
497 return pair; in get_pair_data()
693 struct hist_entry *pair) in compute_cycles_diff() argument
695 pair->diff.computed = true; in compute_cycles_diff()
696 if (pair->block_info->num && he->block_info->num) { in compute_cycles_diff()
697 pair->diff.cycles = in compute_cycles_diff()
698 pair->block_info->cycles_aggr / pair->block_info->num_aggr - in compute_cycles_diff()
712 struct hist_entry *pair = get_block_pair(he, hists_pair); in block_hists_match() local
716 if (pair) { in block_hists_match()
717 hist_entry__add_pair(pair, he); in block_hists_match()
718 compute_cycles_diff(he, pair); in block_hists_match()
743 struct hist_entry *he, *pair; in hists__precompute() local
754 pair = get_pair_data(he, d); in hists__precompute()
755 if (!pair) in hists__precompute()
761 compute_delta(he, pair); in hists__precompute()
764 compute_ratio(he, pair); in hists__precompute()
767 compute_wdiff(he, pair); in hists__precompute()
770 process_block_per_sym(pair); in hists__precompute()
772 pair_bh = container_of(pair, struct block_hist, in hists__precompute()
1329 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair, in cycles_printf() argument
1333 struct block_hist *bh_pair = container_of(pair, struct block_hist, he); in cycles_printf()
1378 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare() local
1383 if (!pair) { in __hpp__color_compare()
1397 if (pair->diff.computed) in __hpp__color_compare()
1398 diff = pair->diff.period_ratio_delta; in __hpp__color_compare()
1400 diff = compute_delta(he, pair); in __hpp__color_compare()
1408 if (pair->diff.computed) in __hpp__color_compare()
1409 diff = pair->diff.period_ratio; in __hpp__color_compare()
1411 diff = compute_ratio(he, pair); in __hpp__color_compare()
1419 if (pair->diff.computed) in __hpp__color_compare()
1420 wdiff = pair->diff.wdiff; in __hpp__color_compare()
1422 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
1429 return cycles_printf(he, pair, hpp, dfmt->header_width); in __hpp__color_compare()
1479 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
1489 if (pair->diff.computed) in hpp__entry_pair()
1490 diff = pair->diff.period_ratio_delta; in hpp__entry_pair()
1492 diff = compute_delta(he, pair); in hpp__entry_pair()
1504 if (pair->diff.computed) in hpp__entry_pair()
1505 ratio = pair->diff.period_ratio; in hpp__entry_pair()
1507 ratio = compute_ratio(he, pair); in hpp__entry_pair()
1520 if (pair->diff.computed) in hpp__entry_pair()
1521 wdiff = pair->diff.wdiff; in hpp__entry_pair()
1523 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1530 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1534 scnprintf(buf, size, "%" PRIu64, pair->stat.period); in hpp__entry_pair()
1546 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global() local
1553 if (pair) in __hpp__entry_global()
1554 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()