Lines Matching refs:pair
239 static double compute_delta(struct hist_entry *he, struct hist_entry *pair) in compute_delta() argument
242 double new_percent = period_percent(pair, pair->stat.period); in compute_delta()
244 pair->diff.period_ratio_delta = new_percent - old_percent; in compute_delta()
245 pair->diff.computed = true; in compute_delta()
246 return pair->diff.period_ratio_delta; in compute_delta()
249 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
252 double new_period = pair->stat.period; in compute_ratio()
254 pair->diff.computed = true; in compute_ratio()
255 pair->diff.period_ratio = new_period / old_period; in compute_ratio()
256 return pair->diff.period_ratio; in compute_ratio()
259 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
262 u64 new_period = pair->stat.period; in compute_wdiff()
264 pair->diff.computed = true; in compute_wdiff()
265 pair->diff.wdiff = new_period * compute_wdiff_w2 - in compute_wdiff()
268 return pair->diff.wdiff; in compute_wdiff()
271 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
275 u64 pair_total = pair->hists->stats.total_period; in formula_delta()
279 pair_total = pair->hists->stats.total_non_filtered_period; in formula_delta()
284 pair->stat.period, pair_total, in formula_delta()
288 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
292 double new_period = pair->stat.period; in formula_ratio()
297 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
301 u64 new_period = pair->stat.period; in formula_wdiff()
308 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
314 return formula_delta(he, pair, buf, size); in formula_fprintf()
316 return formula_ratio(he, pair, buf, size); in formula_fprintf()
318 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
412 struct hist_entry *pair; in get_pair_data() local
414 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
415 if (pair->hists == d->hists) in get_pair_data()
416 return pair; in get_pair_data()
464 struct hist_entry *he, *pair; in hists__precompute() local
472 pair = get_pair_data(he, d); in hists__precompute()
473 if (!pair) in hists__precompute()
479 compute_delta(he, pair); in hists__precompute()
482 compute_ratio(he, pair); in hists__precompute()
485 compute_wdiff(he, pair); in hists__precompute()
897 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare() local
902 if (!pair) in __hpp__color_compare()
907 if (pair->diff.computed) in __hpp__color_compare()
908 diff = pair->diff.period_ratio_delta; in __hpp__color_compare()
910 diff = compute_delta(he, pair); in __hpp__color_compare()
918 if (pair->diff.computed) in __hpp__color_compare()
919 diff = pair->diff.period_ratio; in __hpp__color_compare()
921 diff = compute_ratio(he, pair); in __hpp__color_compare()
929 if (pair->diff.computed) in __hpp__color_compare()
930 wdiff = pair->diff.wdiff; in __hpp__color_compare()
932 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
981 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
991 if (pair->diff.computed) in hpp__entry_pair()
992 diff = pair->diff.period_ratio_delta; in hpp__entry_pair()
994 diff = compute_delta(he, pair); in hpp__entry_pair()
1006 if (pair->diff.computed) in hpp__entry_pair()
1007 ratio = pair->diff.period_ratio; in hpp__entry_pair()
1009 ratio = compute_ratio(he, pair); in hpp__entry_pair()
1022 if (pair->diff.computed) in hpp__entry_pair()
1023 wdiff = pair->diff.wdiff; in hpp__entry_pair()
1025 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1032 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1036 scnprintf(buf, size, "%" PRIu64, pair->stat.period); in hpp__entry_pair()
1048 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global() local
1055 if (pair) in __hpp__entry_global()
1056 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()