Lines Matching full:pair

280 static double compute_delta(struct hist_entry *he, struct hist_entry *pair)  in compute_delta()  argument
283 double new_percent = period_percent(pair, pair->stat.period); in compute_delta()
285 pair->diff.period_ratio_delta = new_percent - old_percent; in compute_delta()
286 pair->diff.computed = true; in compute_delta()
287 return pair->diff.period_ratio_delta; in compute_delta()
290 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
293 double new_period = pair->stat.period; in compute_ratio()
295 pair->diff.computed = true; in compute_ratio()
296 pair->diff.period_ratio = new_period / old_period; in compute_ratio()
297 return pair->diff.period_ratio; in compute_ratio()
300 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
303 u64 new_period = pair->stat.period; in compute_wdiff()
305 pair->diff.computed = true; in compute_wdiff()
306 pair->diff.wdiff = new_period * compute_wdiff_w2 - in compute_wdiff()
309 return pair->diff.wdiff; in compute_wdiff()
312 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
316 u64 pair_total = pair->hists->stats.total_period; in formula_delta()
320 pair_total = pair->hists->stats.total_non_filtered_period; in formula_delta()
325 pair->stat.period, pair_total, in formula_delta()
329 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
333 double new_period = pair->stat.period; in formula_ratio()
338 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
342 u64 new_period = pair->stat.period; in formula_wdiff()
349 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
355 return formula_delta(he, pair, buf, size); in formula_fprintf()
357 return formula_ratio(he, pair, buf, size); in formula_fprintf()
359 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
510 struct hist_entry *pair; in get_pair_data() local
512 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
513 if (pair->hists == d->hists) in get_pair_data()
514 return pair; in get_pair_data()
622 struct hist_entry *pair) in compute_cycles_diff() argument
624 pair->diff.computed = true; in compute_cycles_diff()
625 if (pair->block_info->num && he->block_info->num) { in compute_cycles_diff()
626 pair->diff.cycles = in compute_cycles_diff()
627 pair->block_info->cycles_aggr / pair->block_info->num_aggr - in compute_cycles_diff()
633 init_stats(&pair->diff.stats); in compute_cycles_diff()
634 init_spark_values(pair->diff.svals, NUM_SPARKS); in compute_cycles_diff()
636 for (int i = 0; i < pair->block_info->num; i++) { in compute_cycles_diff()
642 val = llabs(pair->block_info->cycles_spark[i] - in compute_cycles_diff()
645 update_spark_value(pair->diff.svals, NUM_SPARKS, in compute_cycles_diff()
646 &pair->diff.stats, val); in compute_cycles_diff()
647 update_stats(&pair->diff.stats, val); in compute_cycles_diff()
661 struct hist_entry *pair = get_block_pair(he, hists_pair); in block_hists_match() local
665 if (pair) { in block_hists_match()
666 hist_entry__add_pair(pair, he); in block_hists_match()
667 compute_cycles_diff(he, pair); in block_hists_match()
685 struct hist_entry *he, *pair; in hists__precompute() local
699 pair = get_pair_data(he, d); in hists__precompute()
700 if (!pair) in hists__precompute()
706 compute_delta(he, pair); in hists__precompute()
709 compute_ratio(he, pair); in hists__precompute()
712 compute_wdiff(he, pair); in hists__precompute()
715 pair_bh = container_of(pair, struct block_hist, in hists__precompute()
718 block_info__process_sym(pair, pair_bh, NULL, 0, 0); in hists__precompute()
1339 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair, in cycles_printf() argument
1343 struct block_hist *bh_pair = container_of(pair, struct block_hist, he); in cycles_printf()
1389 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare() local
1394 if (!pair) { in __hpp__color_compare()
1408 if (pair->diff.computed) in __hpp__color_compare()
1409 diff = pair->diff.period_ratio_delta; in __hpp__color_compare()
1411 diff = compute_delta(he, pair); in __hpp__color_compare()
1419 if (pair->diff.computed) in __hpp__color_compare()
1420 diff = pair->diff.period_ratio; in __hpp__color_compare()
1422 diff = compute_ratio(he, pair); in __hpp__color_compare()
1430 if (pair->diff.computed) in __hpp__color_compare()
1431 wdiff = pair->diff.wdiff; in __hpp__color_compare()
1433 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
1440 return cycles_printf(he, pair, hpp, dfmt->header_width); in __hpp__color_compare()
1508 struct hist_entry *pair = get_pair_fmt(he, dfmt); in hpp__color_cycles_hist() local
1516 if (!pair) { in hpp__color_cycles_hist()
1523 bh_pair = container_of(pair, struct block_hist, he); in hpp__color_cycles_hist()
1574 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
1584 if (pair->diff.computed) in hpp__entry_pair()
1585 diff = pair->diff.period_ratio_delta; in hpp__entry_pair()
1587 diff = compute_delta(he, pair); in hpp__entry_pair()
1599 if (pair->diff.computed) in hpp__entry_pair()
1600 ratio = pair->diff.period_ratio; in hpp__entry_pair()
1602 ratio = compute_ratio(he, pair); in hpp__entry_pair()
1615 if (pair->diff.computed) in hpp__entry_pair()
1616 wdiff = pair->diff.wdiff; in hpp__entry_pair()
1618 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1625 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1629 scnprintf(buf, size, "%" PRIu64, pair->stat.period); in hpp__entry_pair()
1641 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global() local
1648 if (pair) in __hpp__entry_global()
1649 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()