Lines Matching refs:he

271 static double period_percent(struct hist_entry *he, u64 period)  in period_percent()  argument
273 u64 total = hists__total_period(he->hists); in period_percent()
278 static double compute_delta(struct hist_entry *he, struct hist_entry *pair) in compute_delta() argument
280 double old_percent = period_percent(he, he->stat.period); in compute_delta()
288 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair) in compute_ratio() argument
290 double old_period = he->stat.period ?: 1; in compute_ratio()
298 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair) in compute_wdiff() argument
300 u64 old_period = he->stat.period; in compute_wdiff()
310 static int formula_delta(struct hist_entry *he, struct hist_entry *pair, in formula_delta() argument
313 u64 he_total = he->hists->stats.total_period; in formula_delta()
317 he_total = he->hists->stats.total_non_filtered_period; in formula_delta()
324 he->stat.period, he_total); in formula_delta()
327 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair, in formula_ratio() argument
330 double old_period = he->stat.period; in formula_ratio()
336 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair, in formula_wdiff() argument
339 u64 old_period = he->stat.period; in formula_wdiff()
347 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, in formula_fprintf() argument
353 return formula_delta(he, pair, buf, size); in formula_fprintf()
355 return formula_ratio(he, pair, buf, size); in formula_fprintf()
357 return formula_wdiff(he, pair, buf, size); in formula_fprintf()
373 return &bh->he; in block_hist_zalloc()
376 static void block_hist_free(void *he) in block_hist_free() argument
380 bh = container_of(he, struct block_hist, he); in block_hist_free()
505 get_pair_data(struct hist_entry *he, struct data__file *d) in get_pair_data() argument
507 if (hist_entry__has_pairs(he)) { in get_pair_data()
510 list_for_each_entry(pair, &he->pairs.head, pairs.node) in get_pair_data()
519 get_pair_fmt(struct hist_entry *he, struct diff_hpp_fmt *dfmt) in get_pair_fmt() argument
523 return get_pair_data(he, d); in get_pair_fmt()
538 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in); in hists__baseline_only() local
540 next = rb_next(&he->rb_node_in); in hists__baseline_only()
541 if (!hist_entry__next_pair(he)) { in hists__baseline_only()
542 rb_erase_cached(&he->rb_node_in, root); in hists__baseline_only()
543 hist_entry__delete(he); in hists__baseline_only()
583 static struct hist_entry *get_block_pair(struct hist_entry *he, in get_block_pair() argument
596 cmp = __block_info__cmp(he_pair, he); in get_block_pair()
619 static void compute_cycles_diff(struct hist_entry *he, in compute_cycles_diff() argument
623 if (pair->block_info->num && he->block_info->num) { in compute_cycles_diff()
626 he->block_info->cycles_aggr / he->block_info->num_aggr; in compute_cycles_diff()
637 if (i >= he->block_info->num || i >= NUM_SPARKS) in compute_cycles_diff()
641 he->block_info->cycles_spark[i]); in compute_cycles_diff()
657 struct hist_entry *he = rb_entry(next, struct hist_entry, in block_hists_match() local
659 struct hist_entry *pair = get_block_pair(he, hists_pair); in block_hists_match()
661 next = rb_next(&he->rb_node_in); in block_hists_match()
664 hist_entry__add_pair(pair, he); in block_hists_match()
665 compute_cycles_diff(he, pair); in block_hists_match()
683 struct hist_entry *he, *pair; in hists__precompute() local
687 he = rb_entry(next, struct hist_entry, rb_node_in); in hists__precompute()
688 next = rb_next(&he->rb_node_in); in hists__precompute()
691 bh = container_of(he, struct block_hist, he); in hists__precompute()
693 block_info__process_sym(he, bh, NULL, 0, 0); in hists__precompute()
697 pair = get_pair_data(he, d); in hists__precompute()
704 compute_delta(he, pair); in hists__precompute()
707 compute_ratio(he, pair); in hists__precompute()
710 compute_wdiff(he, pair); in hists__precompute()
714 he); in hists__precompute()
718 bh = container_of(he, struct block_hist, he); in hists__precompute()
1301 static double baseline_percent(struct hist_entry *he) in baseline_percent() argument
1303 u64 total = hists__total_period(he->hists); in baseline_percent()
1305 return 100.0 * he->stat.period / total; in baseline_percent()
1309 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_baseline() argument
1313 double percent = baseline_percent(he); in hpp__color_baseline()
1316 if (!he->dummy) { in hpp__color_baseline()
1325 static int hpp__entry_baseline(struct hist_entry *he, char *buf, size_t size) in hpp__entry_baseline() argument
1327 double percent = baseline_percent(he); in hpp__entry_baseline()
1331 if (!he->dummy) in hpp__entry_baseline()
1337 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair, in cycles_printf() argument
1340 struct block_hist *bh = container_of(he, struct block_hist, he); in cycles_printf()
1341 struct block_hist *bh_pair = container_of(pair, struct block_hist, he); in cycles_printf()
1360 start_line = map__srcline(he->ms.map, bi->sym->start + bi->start, in cycles_printf()
1361 he->ms.sym); in cycles_printf()
1363 end_line = map__srcline(he->ms.map, bi->sym->start + bi->end, in cycles_printf()
1364 he->ms.sym); in cycles_printf()
1382 struct perf_hpp *hpp, struct hist_entry *he, in __hpp__color_compare() argument
1387 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__color_compare()
1396 bh = container_of(he, struct block_hist, he); in __hpp__color_compare()
1409 diff = compute_delta(he, pair); in __hpp__color_compare()
1415 if (he->dummy) in __hpp__color_compare()
1420 diff = compute_ratio(he, pair); in __hpp__color_compare()
1426 if (he->dummy) in __hpp__color_compare()
1431 wdiff = compute_wdiff(he, pair); in __hpp__color_compare()
1438 return cycles_printf(he, pair, hpp, dfmt->header_width); in __hpp__color_compare()
1451 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_delta() argument
1453 return __hpp__color_compare(fmt, hpp, he, COMPUTE_DELTA); in hpp__color_delta()
1457 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_ratio() argument
1459 return __hpp__color_compare(fmt, hpp, he, COMPUTE_RATIO); in hpp__color_ratio()
1463 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_wdiff() argument
1465 return __hpp__color_compare(fmt, hpp, he, COMPUTE_WEIGHTED_DIFF); in hpp__color_wdiff()
1469 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_cycles() argument
1471 return __hpp__color_compare(fmt, hpp, he, COMPUTE_CYCLES); in hpp__color_cycles()
1502 struct perf_hpp *hpp, struct hist_entry *he) in hpp__color_cycles_hist() argument
1506 struct hist_entry *pair = get_pair_fmt(he, dfmt); in hpp__color_cycles_hist()
1507 struct block_hist *bh = container_of(he, struct block_hist, he); in hpp__color_cycles_hist()
1521 bh_pair = container_of(pair, struct block_hist, he); in hpp__color_cycles_hist()
1559 hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size) in hpp__entry_unpair() argument
1563 scnprintf(buf, size, "%" PRIu64, he->stat.period); in hpp__entry_unpair()
1572 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair, in hpp__entry_pair() argument
1585 diff = compute_delta(he, pair); in hpp__entry_pair()
1592 if (he->dummy) { in hpp__entry_pair()
1600 ratio = compute_ratio(he, pair); in hpp__entry_pair()
1608 if (he->dummy) { in hpp__entry_pair()
1616 wdiff = compute_wdiff(he, pair); in hpp__entry_pair()
1623 formula_fprintf(he, pair, buf, size); in hpp__entry_pair()
1636 __hpp__entry_global(struct hist_entry *he, struct diff_hpp_fmt *dfmt, in __hpp__entry_global() argument
1639 struct hist_entry *pair = get_pair_fmt(he, dfmt); in __hpp__entry_global()
1644 hpp__entry_baseline(he, buf, size); in __hpp__entry_global()
1647 hpp__entry_pair(he, pair, idx, buf, size); in __hpp__entry_global()
1649 hpp__entry_unpair(he, idx, buf, size); in __hpp__entry_global()
1654 struct hist_entry *he) in hpp__entry_global() argument
1660 __hpp__entry_global(he, dfmt, buf, MAX_COL_WIDTH); in hpp__entry_global()