Lines Matching refs:he

272 static double period_percent(struct hist_entry *he, u64 period)
274 u64 total = hists__total_period(he->hists);
279 static double compute_delta(struct hist_entry *he, struct hist_entry *pair)
281 double old_percent = period_percent(he, he->stat.period);
289 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair)
291 double old_period = he->stat.period ?: 1;
299 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair)
301 u64 old_period = he->stat.period;
311 static int formula_delta(struct hist_entry *he, struct hist_entry *pair,
314 u64 he_total = he->hists->stats.total_period;
318 he_total = he->hists->stats.total_non_filtered_period;
325 he->stat.period, he_total);
328 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair,
331 double old_period = he->stat.period;
337 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair,
340 u64 old_period = he->stat.period;
348 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair,
354 return formula_delta(he, pair, buf, size);
356 return formula_ratio(he, pair, buf, size);
358 return formula_wdiff(he, pair, buf, size);
374 return &bh->he;
377 static void block_hist_free(void *he)
381 bh = container_of(he, struct block_hist, he);
520 get_pair_data(struct hist_entry *he, struct data__file *d)
522 if (hist_entry__has_pairs(he)) {
525 list_for_each_entry(pair, &he->pairs.head, pairs.node)
534 get_pair_fmt(struct hist_entry *he, struct diff_hpp_fmt *dfmt)
538 return get_pair_data(he, d);
553 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
555 next = rb_next(&he->rb_node_in);
556 if (!hist_entry__next_pair(he)) {
557 rb_erase_cached(&he->rb_node_in, root);
558 hist_entry__delete(he);
598 static struct hist_entry *get_block_pair(struct hist_entry *he,
611 cmp = __block_info__cmp(he_pair, he);
634 static void compute_cycles_diff(struct hist_entry *he,
638 if (pair->block_info->num && he->block_info->num) {
641 he->block_info->cycles_aggr / he->block_info->num_aggr;
652 if (i >= he->block_info->num || i >= NUM_SPARKS)
656 he->block_info->cycles_spark[i]);
672 struct hist_entry *he = rb_entry(next, struct hist_entry,
674 struct hist_entry *pair = get_block_pair(he, hists_pair);
676 next = rb_next(&he->rb_node_in);
679 hist_entry__add_pair(pair, he);
680 compute_cycles_diff(he, pair);
698 struct hist_entry *he, *pair;
702 he = rb_entry(next, struct hist_entry, rb_node_in);
703 next = rb_next(&he->rb_node_in);
706 bh = container_of(he, struct block_hist, he);
708 block_info__process_sym(he, bh, NULL, 0);
712 pair = get_pair_data(he, d);
719 compute_delta(he, pair);
722 compute_ratio(he, pair);
725 compute_wdiff(he, pair);
729 he);
733 bh = container_of(he, struct block_hist, he);
1316 static double baseline_percent(struct hist_entry *he)
1318 u64 total = hists__total_period(he->hists);
1320 return 100.0 * he->stat.period / total;
1324 struct perf_hpp *hpp, struct hist_entry *he)
1328 double percent = baseline_percent(he);
1331 if (!he->dummy) {
1340 static int hpp__entry_baseline(struct hist_entry *he, char *buf, size_t size)
1342 double percent = baseline_percent(he);
1346 if (!he->dummy)
1352 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair,
1355 struct block_hist *bh = container_of(he, struct block_hist, he);
1356 struct block_hist *bh_pair = container_of(pair, struct block_hist, he);
1375 start_line = map__srcline(he->ms.map, bi->sym->start + bi->start,
1376 he->ms.sym);
1378 end_line = map__srcline(he->ms.map, bi->sym->start + bi->end,
1379 he->ms.sym);
1397 struct perf_hpp *hpp, struct hist_entry *he,
1402 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1411 bh = container_of(he, struct block_hist, he);
1424 diff = compute_delta(he, pair);
1430 if (he->dummy)
1435 diff = compute_ratio(he, pair);
1441 if (he->dummy)
1446 wdiff = compute_wdiff(he, pair);
1453 return cycles_printf(he, pair, hpp, dfmt->header_width);
1466 struct perf_hpp *hpp, struct hist_entry *he)
1468 return __hpp__color_compare(fmt, hpp, he, COMPUTE_DELTA);
1472 struct perf_hpp *hpp, struct hist_entry *he)
1474 return __hpp__color_compare(fmt, hpp, he, COMPUTE_RATIO);
1478 struct perf_hpp *hpp, struct hist_entry *he)
1480 return __hpp__color_compare(fmt, hpp, he, COMPUTE_WEIGHTED_DIFF);
1484 struct perf_hpp *hpp, struct hist_entry *he)
1486 return __hpp__color_compare(fmt, hpp, he, COMPUTE_CYCLES);
1517 struct perf_hpp *hpp, struct hist_entry *he)
1521 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1522 struct block_hist *bh = container_of(he, struct block_hist, he);
1536 bh_pair = container_of(pair, struct block_hist, he);
1574 hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size)
1578 scnprintf(buf, size, "%" PRIu64, he->stat.period);
1587 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair,
1600 diff = compute_delta(he, pair);
1607 if (he->dummy) {
1615 ratio = compute_ratio(he, pair);
1623 if (he->dummy) {
1631 wdiff = compute_wdiff(he, pair);
1638 formula_fprintf(he, pair, buf, size);
1651 __hpp__entry_global(struct hist_entry *he, struct diff_hpp_fmt *dfmt,
1654 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1659 hpp__entry_baseline(he, buf, size);
1662 hpp__entry_pair(he, pair, idx, buf, size);
1664 hpp__entry_unpair(he, idx, buf, size);
1669 struct hist_entry *he)
1675 __hpp__entry_global(he, dfmt, buf, MAX_COL_WIDTH);