Lines Matching refs:he

220 static double period_percent(struct hist_entry *he, u64 period)  in period_percent()  argument
222 u64 total = hists__total_period(he->hists); in period_percent()
227 static double compute_delta(struct hist_entry *he, struct hist_entry *pair) in compute_delta() argument
229 double old_percent = period_percent(he, he->stat.period); in compute_delta()
237 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
239 double old_period = he->stat.period ?: 1; in compute_ratio()
247 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
249 u64 old_period = he->stat.period; in compute_wdiff()
259 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
262 u64 he_total = he->hists->stats.total_period; in formula_delta()
266 he_total = he->hists->stats.total_non_filtered_period; in formula_delta()
273 he->stat.period, he_total); in formula_delta()
276 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
279 double old_period = he->stat.period; in formula_ratio()
285 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
288 u64 old_period = he->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()
403 get_pair_data(struct hist_entry *he, struct data__file *d) in get_pair_data() argument
405 if (hist_entry__has_pairs(he)) { in get_pair_data()
408 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
417 get_pair_fmt(struct hist_entry *he, struct diff_hpp_fmt *dfmt) in get_pair_fmt() argument
421 return get_pair_data(he, d); in get_pair_fmt()
436 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in); in hists__baseline_only() local
438 next = rb_next(&he->rb_node_in); in hists__baseline_only()
439 if (!hist_entry__next_pair(he)) { in hists__baseline_only()
440 rb_erase(&he->rb_node_in, root); in hists__baseline_only()
441 hist_entry__delete(he); in hists__baseline_only()
458 struct hist_entry *he, *pair; in hists__precompute() local
462 he = rb_entry(next, struct hist_entry, rb_node_in); in hists__precompute()
463 next = rb_next(&he->rb_node_in); in hists__precompute()
466 pair = get_pair_data(he, d); in hists__precompute()
472 compute_delta(he, pair); in hists__precompute()
475 compute_ratio(he, pair); in hists__precompute()
478 compute_wdiff(he, pair); in hists__precompute()
818 static double baseline_percent(struct hist_entry *he) in baseline_percent() argument
820 u64 total = hists__total_period(he->hists); in baseline_percent()
822 return 100.0 * he->stat.period / total; in baseline_percent()
826 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_baseline() argument
830 double percent = baseline_percent(he); in hpp__color_baseline()
833 if (!he->dummy) { in hpp__color_baseline()
842 static int hpp__entry_baseline(struct hist_entry *he, char *buf, size_t size) in hpp__entry_baseline() argument
844 double percent = baseline_percent(he); in hpp__entry_baseline()
848 if (!he->dummy) in hpp__entry_baseline()
855 struct perf_hpp *hpp, struct hist_entry *he, in __hpp__color_compare() argument
860 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare()
873 diff = compute_delta(he, pair); in __hpp__color_compare()
879 if (he->dummy) in __hpp__color_compare()
884 diff = compute_ratio(he, pair); in __hpp__color_compare()
890 if (he->dummy) in __hpp__color_compare()
895 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
913 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_delta() argument
915 return __hpp__color_compare(fmt, hpp, he, COMPUTE_DELTA); in hpp__color_delta()
919 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_ratio() argument
921 return __hpp__color_compare(fmt, hpp, he, COMPUTE_RATIO); in hpp__color_ratio()
925 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_wdiff() argument
927 return __hpp__color_compare(fmt, hpp, he, COMPUTE_WEIGHTED_DIFF); in hpp__color_wdiff()
931 hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size) in hpp__entry_unpair() argument
935 scnprintf(buf, size, "%" PRIu64, he->stat.period); in hpp__entry_unpair()
944 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
956 diff = compute_delta(he, pair); in hpp__entry_pair()
963 if (he->dummy) { in hpp__entry_pair()
971 ratio = compute_ratio(he, pair); in hpp__entry_pair()
979 if (he->dummy) { in hpp__entry_pair()
987 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
994 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1007 __hpp__entry_global(struct hist_entry *he, struct diff_hpp_fmt *dfmt, in __hpp__entry_global() argument
1010 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global()
1015 hpp__entry_baseline(he, buf, size); in __hpp__entry_global()
1018 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()
1020 hpp__entry_unpair(he, idx, buf, size); in __hpp__entry_global()
1025 struct hist_entry *he) in hpp__entry_global() argument
1031 __hpp__entry_global(he, dfmt, buf, MAX_COL_WIDTH); in hpp__entry_global()