Lines Matching refs:he
12 struct hist_entry *he);
14 struct hist_entry *he);
16 struct hist_entry *he);
225 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) in hists__decay_entry() argument
227 u64 prev_period = he->stat.period; in hists__decay_entry()
233 he_stat__decay(&he->stat); in hists__decay_entry()
235 he_stat__decay(he->stat_acc); in hists__decay_entry()
237 diff = prev_period - he->stat.period; in hists__decay_entry()
240 if (!he->filtered) in hists__decay_entry()
243 return he->stat.period == 0; in hists__decay_entry()
307 struct hist_entry *he; in hist_entry__new() local
312 he = zalloc(sizeof(*he) + callchain_size); in hist_entry__new()
314 if (he != NULL) { in hist_entry__new()
315 *he = *template; in hist_entry__new()
318 he->stat_acc = malloc(sizeof(he->stat)); in hist_entry__new()
319 if (he->stat_acc == NULL) { in hist_entry__new()
320 free(he); in hist_entry__new()
323 memcpy(he->stat_acc, &he->stat, sizeof(he->stat)); in hist_entry__new()
325 memset(&he->stat, 0, sizeof(he->stat)); in hist_entry__new()
328 if (he->ms.map) in hist_entry__new()
329 he->ms.map->referenced = true; in hist_entry__new()
331 if (he->branch_info) { in hist_entry__new()
337 he->branch_info = malloc(sizeof(*he->branch_info)); in hist_entry__new()
338 if (he->branch_info == NULL) { in hist_entry__new()
339 free(he->stat_acc); in hist_entry__new()
340 free(he); in hist_entry__new()
344 memcpy(he->branch_info, template->branch_info, in hist_entry__new()
345 sizeof(*he->branch_info)); in hist_entry__new()
347 if (he->branch_info->from.map) in hist_entry__new()
348 he->branch_info->from.map->referenced = true; in hist_entry__new()
349 if (he->branch_info->to.map) in hist_entry__new()
350 he->branch_info->to.map->referenced = true; in hist_entry__new()
353 if (he->mem_info) { in hist_entry__new()
354 if (he->mem_info->iaddr.map) in hist_entry__new()
355 he->mem_info->iaddr.map->referenced = true; in hist_entry__new()
356 if (he->mem_info->daddr.map) in hist_entry__new()
357 he->mem_info->daddr.map->referenced = true; in hist_entry__new()
361 callchain_init(he->callchain); in hist_entry__new()
363 INIT_LIST_HEAD(&he->pairs.node); in hist_entry__new()
366 return he; in hist_entry__new()
383 struct hist_entry *he; in add_hist_entry() local
392 he = rb_entry(parent, struct hist_entry, rb_node_in); in add_hist_entry()
400 cmp = hist_entry__cmp(he, entry); in add_hist_entry()
404 he_stat__add_period(&he->stat, period, weight); in add_hist_entry()
406 he_stat__add_period(he->stat_acc, period, weight); in add_hist_entry()
420 if (he->ms.map != entry->ms.map) { in add_hist_entry()
421 he->ms.map = entry->ms.map; in add_hist_entry()
422 if (he->ms.map) in add_hist_entry()
423 he->ms.map->referenced = true; in add_hist_entry()
434 he = hist_entry__new(entry, sample_self); in add_hist_entry()
435 if (!he) in add_hist_entry()
438 rb_link_node(&he->rb_node_in, parent, p); in add_hist_entry()
439 rb_insert_color(&he->rb_node_in, hists->entries_in); in add_hist_entry()
442 he_stat__add_cpumode_period(&he->stat, al->cpumode, period); in add_hist_entry()
444 he_stat__add_cpumode_period(he->stat_acc, al->cpumode, period); in add_hist_entry()
445 return he; in add_hist_entry()
517 struct hist_entry *he; in iter_add_single_mem_entry() local
533 he = __hists__add_entry(hists, al, iter->parent, NULL, mi, in iter_add_single_mem_entry()
535 if (!he) in iter_add_single_mem_entry()
538 iter->he = he; in iter_add_single_mem_entry()
548 struct hist_entry *he = iter->he; in iter_finish_mem_entry() local
551 if (he == NULL) in iter_finish_mem_entry()
554 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
556 err = hist_entry__append_callchain(he, iter->sample); in iter_finish_mem_entry()
566 iter->he = NULL; in iter_finish_mem_entry()
592 iter->he = NULL; in iter_add_single_branch_entry()
621 struct hist_entry *he = NULL; in iter_add_next_branch_entry() local
634 he = __hists__add_entry(hists, al, iter->parent, &bi[i], NULL, in iter_add_next_branch_entry()
636 if (he == NULL) in iter_add_next_branch_entry()
639 hists__inc_nr_samples(hists, he->filtered); in iter_add_next_branch_entry()
642 iter->he = he; in iter_add_next_branch_entry()
652 iter->he = NULL; in iter_finish_branch_entry()
669 struct hist_entry *he; in iter_add_single_normal_entry() local
671 he = __hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_single_normal_entry()
674 if (he == NULL) in iter_add_single_normal_entry()
677 iter->he = he; in iter_add_single_normal_entry()
685 struct hist_entry *he = iter->he; in iter_finish_normal_entry() local
689 if (he == NULL) in iter_finish_normal_entry()
692 iter->he = NULL; in iter_finish_normal_entry()
694 hists__inc_nr_samples(evsel__hists(evsel), he->filtered); in iter_finish_normal_entry()
696 return hist_entry__append_callchain(he, sample); in iter_finish_normal_entry()
730 struct hist_entry *he; in iter_add_single_cumulative_entry() local
733 he = __hists__add_entry(hists, al, iter->parent, NULL, NULL, in iter_add_single_cumulative_entry()
736 if (he == NULL) in iter_add_single_cumulative_entry()
739 iter->he = he; in iter_add_single_cumulative_entry()
740 he_cache[iter->curr++] = he; in iter_add_single_cumulative_entry()
742 callchain_append(he->callchain, &callchain_cursor, sample->period); in iter_add_single_cumulative_entry()
750 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
775 struct hist_entry *he; in iter_add_next_cumulative_entry() local
801 iter->he = NULL; in iter_add_next_cumulative_entry()
806 he = __hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, in iter_add_next_cumulative_entry()
809 if (he == NULL) in iter_add_next_cumulative_entry()
812 iter->he = he; in iter_add_next_cumulative_entry()
813 he_cache[iter->curr++] = he; in iter_add_next_cumulative_entry()
815 callchain_append(he->callchain, &cursor, sample->period); in iter_add_next_cumulative_entry()
824 iter->he = NULL; in iter_finish_cumulative_entry()
883 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
894 if (iter->he && iter->add_entry_cb) { in hist_entry_iter__add()
945 void hist_entry__free(struct hist_entry *he) in hist_entry__free() argument
947 zfree(&he->branch_info); in hist_entry__free()
948 zfree(&he->mem_info); in hist_entry__free()
949 zfree(&he->stat_acc); in hist_entry__free()
950 free_srcline(he->srcline); in hist_entry__free()
951 free(he); in hist_entry__free()
960 struct hist_entry *he) in hists__collapse_insert_entry() argument
971 cmp = hist_entry__collapse(iter, he); in hists__collapse_insert_entry()
974 he_stat__add_stat(&iter->stat, &he->stat); in hists__collapse_insert_entry()
976 he_stat__add_stat(iter->stat_acc, he->stat_acc); in hists__collapse_insert_entry()
982 he->callchain); in hists__collapse_insert_entry()
984 hist_entry__free(he); in hists__collapse_insert_entry()
994 rb_link_node(&he->rb_node_in, parent, p); in hists__collapse_insert_entry()
995 rb_insert_color(&he->rb_node_in, root); in hists__collapse_insert_entry()
1014 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1016 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1017 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1018 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1100 struct hist_entry *he, in __hists__insert_output_entry() argument
1108 callchain_param.sort(&he->sorted_chain, he->callchain, in __hists__insert_output_entry()
1115 if (hist_entry__sort(he, iter) > 0) in __hists__insert_output_entry()
1121 rb_link_node(&he->rb_node, parent, p); in __hists__insert_output_entry()
1122 rb_insert_color(&he->rb_node, entries); in __hists__insert_output_entry()
1176 struct hist_entry *he) in hists__filter_entry_by_dso() argument
1179 (he->ms.map == NULL || he->ms.map->dso != hists->dso_filter)) { in hists__filter_entry_by_dso()
1180 he->filtered |= (1 << HIST_FILTER__DSO); in hists__filter_entry_by_dso()
1210 struct hist_entry *he) in hists__filter_entry_by_thread() argument
1213 he->thread != hists->thread_filter) { in hists__filter_entry_by_thread()
1214 he->filtered |= (1 << HIST_FILTER__THREAD); in hists__filter_entry_by_thread()
1241 struct hist_entry *he) in hists__filter_entry_by_symbol() argument
1244 (!he->ms.sym || strstr(he->ms.sym->name, in hists__filter_entry_by_symbol()
1246 he->filtered |= (1 << HIST_FILTER__SYMBOL); in hists__filter_entry_by_symbol()
1296 struct hist_entry *he; in hists__add_dummy_entry() local
1308 he = rb_entry(parent, struct hist_entry, rb_node_in); in hists__add_dummy_entry()
1310 cmp = hist_entry__collapse(he, pair); in hists__add_dummy_entry()
1321 he = hist_entry__new(pair, true); in hists__add_dummy_entry()
1322 if (he) { in hists__add_dummy_entry()
1323 memset(&he->stat, 0, sizeof(he->stat)); in hists__add_dummy_entry()
1324 he->hists = hists; in hists__add_dummy_entry()
1325 rb_link_node(&he->rb_node_in, parent, p); in hists__add_dummy_entry()
1326 rb_insert_color(&he->rb_node_in, root); in hists__add_dummy_entry()
1327 hists__inc_stats(hists, he); in hists__add_dummy_entry()
1328 he->dummy = true; in hists__add_dummy_entry()
1331 return he; in hists__add_dummy_entry()
1335 struct hist_entry *he) in hists__find_entry() argument
1346 int64_t cmp = hist_entry__collapse(iter, he); in hists__find_entry()