Lines Matching defs:he

273 static double period_percent(struct hist_entry *he, u64 period)
275 u64 total = hists__total_period(he->hists);
280 static double compute_delta(struct hist_entry *he, struct hist_entry *pair)
282 double old_percent = period_percent(he, he->stat.period);
290 static double compute_ratio(struct hist_entry *he, struct hist_entry *pair)
292 double old_period = he->stat.period ?: 1;
300 static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair)
302 u64 old_period = he->stat.period;
312 static int formula_delta(struct hist_entry *he, struct hist_entry *pair,
315 u64 he_total = he->hists->stats.total_period;
319 he_total = he->hists->stats.total_non_filtered_period;
326 he->stat.period, he_total);
329 static int formula_ratio(struct hist_entry *he, struct hist_entry *pair,
332 double old_period = he->stat.period;
338 static int formula_wdiff(struct hist_entry *he, struct hist_entry *pair,
341 u64 old_period = he->stat.period;
349 static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair,
355 return formula_delta(he, pair, buf, size);
357 return formula_ratio(he, pair, buf, size);
359 return formula_wdiff(he, pair, buf, size);
375 return &bh->he;
378 static void block_hist_free(void *he)
382 bh = container_of(he, struct block_hist, he);
507 get_pair_data(struct hist_entry *he, struct data__file *d)
509 if (hist_entry__has_pairs(he)) {
512 list_for_each_entry(pair, &he->pairs.head, pairs.node)
521 get_pair_fmt(struct hist_entry *he, struct diff_hpp_fmt *dfmt)
525 return get_pair_data(he, d);
540 struct hist_entry *he = rb_entry(next, struct hist_entry, rb_node_in);
542 next = rb_next(&he->rb_node_in);
543 if (!hist_entry__next_pair(he)) {
544 rb_erase_cached(&he->rb_node_in, root);
545 hist_entry__delete(he);
585 static struct hist_entry *get_block_pair(struct hist_entry *he,
598 cmp = __block_info__cmp(he_pair, he);
621 static void compute_cycles_diff(struct hist_entry *he,
625 if (pair->block_info->num && he->block_info->num) {
628 he->block_info->cycles_aggr / he->block_info->num_aggr;
639 if (i >= he->block_info->num || i >= NUM_SPARKS)
643 he->block_info->cycles_spark[i]);
659 struct hist_entry *he = rb_entry(next, struct hist_entry,
661 struct hist_entry *pair = get_block_pair(he, hists_pair);
663 next = rb_next(&he->rb_node_in);
666 hist_entry__add_pair(pair, he);
667 compute_cycles_diff(he, pair);
685 struct hist_entry *he, *pair;
689 he = rb_entry(next, struct hist_entry, rb_node_in);
690 next = rb_next(&he->rb_node_in);
693 bh = container_of(he, struct block_hist, he);
695 block_info__process_sym(he, bh, NULL, 0, 0);
699 pair = get_pair_data(he, d);
706 compute_delta(he, pair);
709 compute_ratio(he, pair);
712 compute_wdiff(he, pair);
716 he);
720 bh = container_of(he, struct block_hist, he);
1303 static double baseline_percent(struct hist_entry *he)
1305 u64 total = hists__total_period(he->hists);
1307 return 100.0 * he->stat.period / total;
1311 struct perf_hpp *hpp, struct hist_entry *he)
1315 double percent = baseline_percent(he);
1318 if (!he->dummy) {
1327 static int hpp__entry_baseline(struct hist_entry *he, char *buf, size_t size)
1329 double percent = baseline_percent(he);
1333 if (!he->dummy)
1339 static int cycles_printf(struct hist_entry *he, struct hist_entry *pair,
1342 struct block_hist *bh = container_of(he, struct block_hist, he);
1343 struct block_hist *bh_pair = container_of(pair, struct block_hist, he);
1362 start_line = map__srcline(he->ms.map, bi->sym->start + bi->start,
1363 he->ms.sym);
1365 end_line = map__srcline(he->ms.map, bi->sym->start + bi->end,
1366 he->ms.sym);
1384 struct perf_hpp *hpp, struct hist_entry *he,
1389 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1398 bh = container_of(he, struct block_hist, he);
1411 diff = compute_delta(he, pair);
1417 if (he->dummy)
1422 diff = compute_ratio(he, pair);
1428 if (he->dummy)
1433 wdiff = compute_wdiff(he, pair);
1440 return cycles_printf(he, pair, hpp, dfmt->header_width);
1453 struct perf_hpp *hpp, struct hist_entry *he)
1455 return __hpp__color_compare(fmt, hpp, he, COMPUTE_DELTA);
1459 struct perf_hpp *hpp, struct hist_entry *he)
1461 return __hpp__color_compare(fmt, hpp, he, COMPUTE_RATIO);
1465 struct perf_hpp *hpp, struct hist_entry *he)
1467 return __hpp__color_compare(fmt, hpp, he, COMPUTE_WEIGHTED_DIFF);
1471 struct perf_hpp *hpp, struct hist_entry *he)
1473 return __hpp__color_compare(fmt, hpp, he, COMPUTE_CYCLES);
1504 struct perf_hpp *hpp, struct hist_entry *he)
1508 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1509 struct block_hist *bh = container_of(he, struct block_hist, he);
1523 bh_pair = container_of(pair, struct block_hist, he);
1561 hpp__entry_unpair(struct hist_entry *he, int idx, char *buf, size_t size)
1565 scnprintf(buf, size, "%" PRIu64, he->stat.period);
1574 hpp__entry_pair(struct hist_entry *he, struct hist_entry *pair,
1587 diff = compute_delta(he, pair);
1594 if (he->dummy) {
1602 ratio = compute_ratio(he, pair);
1610 if (he->dummy) {
1618 wdiff = compute_wdiff(he, pair);
1625 formula_fprintf(he, pair, buf, size);
1638 __hpp__entry_global(struct hist_entry *he, struct diff_hpp_fmt *dfmt,
1641 struct hist_entry *pair = get_pair_fmt(he, dfmt);
1646 hpp__entry_baseline(he, buf, size);
1649 hpp__entry_pair(he, pair, idx, buf, size);
1651 hpp__entry_unpair(he, idx, buf, size);
1656 struct hist_entry *he)
1662 __hpp__entry_global(he, dfmt, buf, MAX_COL_WIDTH);