Lines Matching full:pair

279 static double compute_delta(struct hist_entry *he, struct hist_entry *pair)  in compute_delta()  argument
282 double new_percent = period_percent(pair, pair->stat.period); in compute_delta()
284 pair->diff.period_ratio_delta = new_percent - old_percent; in compute_delta()
285 pair->diff.computed = true; in compute_delta()
286 return pair->diff.period_ratio_delta; in compute_delta()
289 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
292 double new_period = pair->stat.period; in compute_ratio()
294 pair->diff.computed = true; in compute_ratio()
295 pair->diff.period_ratio = new_period / old_period; in compute_ratio()
296 return pair->diff.period_ratio; in compute_ratio()
299 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
302 u64 new_period = pair->stat.period; in compute_wdiff()
304 pair->diff.computed = true; in compute_wdiff()
305 pair->diff.wdiff = new_period * compute_wdiff_w2 - in compute_wdiff()
308 return pair->diff.wdiff; in compute_wdiff()
311 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
315 u64 pair_total = pair->hists->stats.total_period; in formula_delta()
319 pair_total = pair->hists->stats.total_non_filtered_period; in formula_delta()
324 pair->stat.period, pair_total, in formula_delta()
328 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
332 double new_period = pair->stat.period; in formula_ratio()
337 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
341 u64 new_period = pair->stat.period; in formula_wdiff()
348 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
354 return formula_delta(he, pair, buf, size); in formula_fprintf()
356 return formula_ratio(he, pair, buf, size); in formula_fprintf()
358 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
521 struct hist_entry *pair; in get_pair_data() local
523 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
524 if (pair->hists == d->hists) in get_pair_data()
525 return pair; in get_pair_data()
633 struct hist_entry *pair) in compute_cycles_diff() argument
635 pair->diff.computed = true; in compute_cycles_diff()
636 if (pair->block_info->num && he->block_info->num) { in compute_cycles_diff()
637 pair->diff.cycles = in compute_cycles_diff()
638 pair->block_info->cycles_aggr / pair->block_info->num_aggr - in compute_cycles_diff()
644 init_stats(&pair->diff.stats); in compute_cycles_diff()
645 init_spark_values(pair->diff.svals, NUM_SPARKS); in compute_cycles_diff()
647 for (int i = 0; i < pair->block_info->num; i++) { in compute_cycles_diff()
653 val = llabs(pair->block_info->cycles_spark[i] - in compute_cycles_diff()
656 update_spark_value(pair->diff.svals, NUM_SPARKS, in compute_cycles_diff()
657 &pair->diff.stats, val); in compute_cycles_diff()
658 update_stats(&pair->diff.stats, val); in compute_cycles_diff()
672 struct hist_entry *pair = get_block_pair(he, hists_pair); in block_hists_match() local
676 if (pair) { in block_hists_match()
677 hist_entry__add_pair(pair, he); in block_hists_match()
678 compute_cycles_diff(he, pair); in block_hists_match()
696 struct hist_entry *he, *pair; in hists__precompute() local
710 pair = get_pair_data(he, d); in hists__precompute()
711 if (!pair) in hists__precompute()
717 compute_delta(he, pair); in hists__precompute()
720 compute_ratio(he, pair); in hists__precompute()
723 compute_wdiff(he, pair); in hists__precompute()
726 pair_bh = container_of(pair, struct block_hist, in hists__precompute()
729 block_info__process_sym(pair, pair_bh, NULL, 0); in hists__precompute()
1350 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair, in cycles_printf() argument
1354 struct block_hist *bh_pair = container_of(pair, struct block_hist, he); in cycles_printf()
1400 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare() local
1405 if (!pair) { in __hpp__color_compare()
1419 if (pair->diff.computed) in __hpp__color_compare()
1420 diff = pair->diff.period_ratio_delta; in __hpp__color_compare()
1422 diff = compute_delta(he, pair); in __hpp__color_compare()
1430 if (pair->diff.computed) in __hpp__color_compare()
1431 diff = pair->diff.period_ratio; in __hpp__color_compare()
1433 diff = compute_ratio(he, pair); in __hpp__color_compare()
1441 if (pair->diff.computed) in __hpp__color_compare()
1442 wdiff = pair->diff.wdiff; in __hpp__color_compare()
1444 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
1451 return cycles_printf(he, pair, hpp, dfmt->header_width); in __hpp__color_compare()
1519 struct hist_entry *pair = get_pair_fmt(he, dfmt); in hpp__color_cycles_hist() local
1527 if (!pair) { in hpp__color_cycles_hist()
1534 bh_pair = container_of(pair, struct block_hist, he); in hpp__color_cycles_hist()
1585 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
1595 if (pair->diff.computed) in hpp__entry_pair()
1596 diff = pair->diff.period_ratio_delta; in hpp__entry_pair()
1598 diff = compute_delta(he, pair); in hpp__entry_pair()
1610 if (pair->diff.computed) in hpp__entry_pair()
1611 ratio = pair->diff.period_ratio; in hpp__entry_pair()
1613 ratio = compute_ratio(he, pair); in hpp__entry_pair()
1626 if (pair->diff.computed) in hpp__entry_pair()
1627 wdiff = pair->diff.wdiff; in hpp__entry_pair()
1629 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1636 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1640 scnprintf(buf, size, "%" PRIu64, pair->stat.period); in hpp__entry_pair()
1652 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global() local
1659 if (pair) in __hpp__entry_global()
1660 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()