Lines Matching refs:pair
227 static double compute_delta(struct hist_entry *he, struct hist_entry *pair) in compute_delta() argument
230 double new_percent = period_percent(pair, pair->stat.period); in compute_delta()
232 pair->diff.period_ratio_delta = new_percent - old_percent; in compute_delta()
233 pair->diff.computed = true; in compute_delta()
234 return pair->diff.period_ratio_delta; in compute_delta()
237 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
240 double new_period = pair->stat.period; in compute_ratio()
242 pair->diff.computed = true; in compute_ratio()
243 pair->diff.period_ratio = new_period / old_period; in compute_ratio()
244 return pair->diff.period_ratio; in compute_ratio()
247 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
250 u64 new_period = pair->stat.period; in compute_wdiff()
252 pair->diff.computed = true; in compute_wdiff()
253 pair->diff.wdiff = new_period * compute_wdiff_w2 - in compute_wdiff()
256 return pair->diff.wdiff; in compute_wdiff()
259 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
263 u64 pair_total = pair->hists->stats.total_period; in formula_delta()
267 pair_total = pair->hists->stats.total_non_filtered_period; in formula_delta()
272 pair->stat.period, pair_total, in formula_delta()
276 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
280 double new_period = pair->stat.period; in formula_ratio()
285 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
289 u64 new_period = pair->stat.period; in formula_wdiff()
296 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
301 return formula_delta(he, pair, buf, size); in formula_fprintf()
303 return formula_ratio(he, pair, buf, size); in formula_fprintf()
305 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
409 struct hist_entry *pair; in get_pair_data() local
411 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
412 if (pair->hists == d->hists) in get_pair_data()
413 return pair; in get_pair_data()
461 struct hist_entry *he, *pair; in hists__precompute() local
469 pair = get_pair_data(he, d); in hists__precompute()
470 if (!pair) in hists__precompute()
475 compute_delta(he, pair); in hists__precompute()
478 compute_ratio(he, pair); in hists__precompute()
481 compute_wdiff(he, pair); in hists__precompute()
866 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare() local
871 if (!pair) in __hpp__color_compare()
876 if (pair->diff.computed) in __hpp__color_compare()
877 diff = pair->diff.period_ratio_delta; in __hpp__color_compare()
879 diff = compute_delta(he, pair); in __hpp__color_compare()
887 if (pair->diff.computed) in __hpp__color_compare()
888 diff = pair->diff.period_ratio; in __hpp__color_compare()
890 diff = compute_ratio(he, pair); in __hpp__color_compare()
898 if (pair->diff.computed) in __hpp__color_compare()
899 wdiff = pair->diff.wdiff; in __hpp__color_compare()
901 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
950 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
959 if (pair->diff.computed) in hpp__entry_pair()
960 diff = pair->diff.period_ratio_delta; in hpp__entry_pair()
962 diff = compute_delta(he, pair); in hpp__entry_pair()
974 if (pair->diff.computed) in hpp__entry_pair()
975 ratio = pair->diff.period_ratio; in hpp__entry_pair()
977 ratio = compute_ratio(he, pair); in hpp__entry_pair()
990 if (pair->diff.computed) in hpp__entry_pair()
991 wdiff = pair->diff.wdiff; in hpp__entry_pair()
993 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1000 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1004 scnprintf(buf, size, "%" PRIu64, pair->stat.period); in hpp__entry_pair()
1016 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global() local
1023 if (pair) in __hpp__entry_global()
1024 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()