Home | History | Annotate | Download | only in util

Lines Matching defs:he

11 				       struct hist_entry *he);
13 struct hist_entry *he);
15 struct hist_entry *he);
181 static void hist_entry__add_cpumode_period(struct hist_entry *he,
186 he->stat.period_sys += period;
189 he->stat.period_us += period;
192 he->stat.period_guest_sys += period;
195 he->stat.period_guest_us += period;
222 static void hist_entry__decay(struct hist_entry *he)
224 he->stat.period = (he->stat.period * 7) / 8;
225 he->stat.nr_events = (he->stat.nr_events * 7) / 8;
229 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he)
231 u64 prev_period = he->stat.period;
236 hist_entry__decay(he);
238 if (!he->filtered)
239 hists->stats.total_period -= prev_period - he->stat.period;
241 return he->stat.period == 0;
279 struct hist_entry *he = zalloc(sizeof(*he) + callchain_size);
281 if (he != NULL) {
282 *he = *template;
284 if (he->ms.map)
285 he->ms.map->referenced = true;
287 if (he->branch_info) {
293 he->branch_info = malloc(sizeof(*he->branch_info));
294 if (he->branch_info == NULL) {
295 free(he);
299 memcpy(he->branch_info, template->branch_info,
300 sizeof(*he->branch_info));
302 if (he->branch_info->from.map)
303 he->branch_info->from.map->referenced = true;
304 if (he->branch_info->to.map)
305 he->branch_info->to.map->referenced = true;
308 if (he->mem_info) {
309 if (he->mem_info->iaddr.map)
310 he->mem_info->iaddr.map->referenced = true;
311 if (he->mem_info->daddr.map)
312 he->mem_info->daddr.map->referenced = true;
316 callchain_init(he->callchain);
318 INIT_LIST_HEAD(&he->pairs.node);
321 return he;
348 struct hist_entry *he;
355 he = rb_entry(parent, struct hist_entry, rb_node_in);
363 cmp = hist_entry__cmp(he, entry);
366 he_stat__add_period(&he->stat, period, weight);
380 if (he->ms.map != entry->ms.map) {
381 he->ms.map = entry->ms.map;
382 if (he->ms.map)
383 he->ms.map->referenced = true;
394 he = hist_entry__new(entry);
395 if (!he)
398 rb_link_node(&he->rb_node_in, parent, p);
399 rb_insert_color(&he->rb_node_in, hists->entries_in);
401 hist_entry__add_cpumode_period(he, al->cpumode, period);
402 return he;
529 void hist_entry__free(struct hist_entry *he)
531 free(he->branch_info);
532 free(he->mem_info);
533 free(he);
542 struct hist_entry *he)
553 cmp = hist_entry__collapse(iter, he);
556 he_stat__add_stat(&iter->stat, &he->stat);
562 he->callchain);
564 hist_entry__free(he);
574 rb_link_node(&he->rb_node_in, parent, p);
575 rb_insert_color(&he->rb_node_in, root);
594 static void hists__apply_filters(struct hists *hists, struct hist_entry *he)
596 hists__filter_entry_by_dso(hists, he);
597 hists__filter_entry_by_thread(hists, he);
598 hists__filter_entry_by_symbol(hists, he);
692 struct hist_entry *he,
700 callchain_param.sort(&he->sorted_chain, he->callchain,
707 if (hist_entry__sort_on_period(he, iter) > 0)
713 rb_link_node(&he->rb_node, parent, p);
714 rb_insert_color(&he->rb_node, entries);
766 struct hist_entry *he)
769 (he->ms.map == NULL || he->ms.map->dso != hists->dso_filter)) {
770 he->filtered |= (1 << HIST_FILTER__DSO);
799 struct hist_entry *he)
802 he->thread != hists->thread_filter) {
803 he->filtered |= (1 << HIST_FILTER__THREAD);
829 struct hist_entry *he)
832 (!he->ms.sym || strstr(he->ms.sym->name,
834 he->filtered |= (1 << HIST_FILTER__SYMBOL);
859 int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip)
861 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip);
864 int hist_entry__annotate(struct hist_entry *he, size_t privsize)
866 return symbol__annotate(he->ms.sym, he->ms.map, privsize);
886 struct hist_entry *he;
898 he = rb_entry(parent, struct hist_entry, rb_node_in);
900 cmp = hist_entry__collapse(he, pair);
911 he = hist_entry__new(pair);
912 if (he) {
913 memset(&he->stat, 0, sizeof(he->stat));
914 he->hists = hists;
915 rb_link_node(&he->rb_node_in, parent, p);
916 rb_insert_color(&he->rb_node_in, root);
917 hists__inc_nr_entries(hists, he);
918 he->dummy = true;
921 return he;
925 struct hist_entry *he)
936 int64_t cmp = hist_entry__collapse(iter, he);