• Home
  • Raw
  • Download

Lines Matching refs:hists

33 static bool hists__filter_entry_by_dso(struct hists *hists,
35 static bool hists__filter_entry_by_thread(struct hists *hists,
37 static bool hists__filter_entry_by_symbol(struct hists *hists,
39 static bool hists__filter_entry_by_socket(struct hists *hists,
42 u16 hists__col_len(struct hists *hists, enum hist_column col) in hists__col_len() argument
44 return hists->col_len[col]; in hists__col_len()
47 void hists__set_col_len(struct hists *hists, enum hist_column col, u16 len) in hists__set_col_len() argument
49 hists->col_len[col] = len; in hists__set_col_len()
52 bool hists__new_col_len(struct hists *hists, enum hist_column col, u16 len) in hists__new_col_len() argument
54 if (len > hists__col_len(hists, col)) { in hists__new_col_len()
55 hists__set_col_len(hists, col, len); in hists__new_col_len()
61 void hists__reset_col_len(struct hists *hists) in hists__reset_col_len() argument
66 hists__set_col_len(hists, col, 0); in hists__reset_col_len()
69 static void hists__set_unres_dso_col_len(struct hists *hists, int dso) in hists__set_unres_dso_col_len() argument
73 if (hists__col_len(hists, dso) < unresolved_col_width && in hists__set_unres_dso_col_len()
76 hists__set_col_len(hists, dso, unresolved_col_width); in hists__set_unres_dso_col_len()
79 void hists__calc_col_len(struct hists *hists, struct hist_entry *h) in hists__calc_col_len() argument
96 hists__new_col_len(hists, HISTC_SYMBOL, symlen); in hists__calc_col_len()
99 hists__new_col_len(hists, HISTC_SYMBOL, symlen); in hists__calc_col_len()
100 hists__set_unres_dso_col_len(hists, HISTC_DSO); in hists__calc_col_len()
104 if (hists__new_col_len(hists, HISTC_COMM, len)) in hists__calc_col_len()
105 hists__set_col_len(hists, HISTC_THREAD, len + 8); in hists__calc_col_len()
109 hists__new_col_len(hists, HISTC_DSO, len); in hists__calc_col_len()
113 hists__new_col_len(hists, HISTC_PARENT, h->parent->namelen); in hists__calc_col_len()
120 hists__new_col_len(hists, HISTC_SYMBOL_FROM, symlen); in hists__calc_col_len()
123 hists__new_col_len(hists, HISTC_DSO_FROM, symlen); in hists__calc_col_len()
126 hists__new_col_len(hists, HISTC_SYMBOL_FROM, symlen); in hists__calc_col_len()
127 hists__set_unres_dso_col_len(hists, HISTC_DSO_FROM); in hists__calc_col_len()
134 hists__new_col_len(hists, HISTC_SYMBOL_TO, symlen); in hists__calc_col_len()
137 hists__new_col_len(hists, HISTC_DSO_TO, symlen); in hists__calc_col_len()
140 hists__new_col_len(hists, HISTC_SYMBOL_TO, symlen); in hists__calc_col_len()
141 hists__set_unres_dso_col_len(hists, HISTC_DSO_TO); in hists__calc_col_len()
145 hists__new_col_len(hists, HISTC_SRCLINE_FROM, in hists__calc_col_len()
148 hists__new_col_len(hists, HISTC_SRCLINE_TO, in hists__calc_col_len()
156 hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, in hists__calc_col_len()
158 hists__new_col_len(hists, HISTC_MEM_DCACHELINE, in hists__calc_col_len()
162 hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, in hists__calc_col_len()
164 hists__new_col_len(hists, HISTC_MEM_DCACHELINE, in hists__calc_col_len()
171 hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, in hists__calc_col_len()
175 hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, in hists__calc_col_len()
181 hists__new_col_len(hists, HISTC_MEM_DADDR_DSO, in hists__calc_col_len()
185 hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); in hists__calc_col_len()
188 hists__new_col_len(hists, HISTC_MEM_PHYS_DADDR, in hists__calc_col_len()
193 hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); in hists__calc_col_len()
194 hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, symlen); in hists__calc_col_len()
195 hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); in hists__calc_col_len()
198 hists__new_col_len(hists, HISTC_CGROUP, 6); in hists__calc_col_len()
199 hists__new_col_len(hists, HISTC_CGROUP_ID, 20); in hists__calc_col_len()
200 hists__new_col_len(hists, HISTC_CPU, 3); in hists__calc_col_len()
201 hists__new_col_len(hists, HISTC_SOCKET, 6); in hists__calc_col_len()
202 hists__new_col_len(hists, HISTC_MEM_LOCKED, 6); in hists__calc_col_len()
203 hists__new_col_len(hists, HISTC_MEM_TLB, 22); in hists__calc_col_len()
204 hists__new_col_len(hists, HISTC_MEM_SNOOP, 12); in hists__calc_col_len()
205 hists__new_col_len(hists, HISTC_MEM_LVL, 21 + 3); in hists__calc_col_len()
206 hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12); in hists__calc_col_len()
207 hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12); in hists__calc_col_len()
209 hists__new_col_len(hists, HISTC_TIME, 16); in hists__calc_col_len()
211 hists__new_col_len(hists, HISTC_TIME, 12); in hists__calc_col_len()
215 hists__new_col_len(hists, HISTC_SRCLINE, len); in hists__calc_col_len()
219 hists__new_col_len(hists, HISTC_SRCFILE, strlen(h->srcfile)); in hists__calc_col_len()
222 hists__new_col_len(hists, HISTC_TRANSACTION, in hists__calc_col_len()
226 hists__new_col_len(hists, HISTC_TRACE, strlen(h->trace_output)); in hists__calc_col_len()
235 hists__new_col_len(hists, HISTC_CGROUP, strlen(cgrp_name)); in hists__calc_col_len()
239 void hists__output_recalc_col_len(struct hists *hists, int max_rows) in hists__output_recalc_col_len() argument
241 struct rb_node *next = rb_first_cached(&hists->entries); in hists__output_recalc_col_len()
245 hists__reset_col_len(hists); in hists__output_recalc_col_len()
250 hists__calc_col_len(hists, n); in hists__output_recalc_col_len()
311 static void hists__delete_entry(struct hists *hists, struct hist_entry *he);
313 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) in hists__decay_entry() argument
329 hists->stats.total_period -= diff; in hists__decay_entry()
331 hists->stats.total_non_filtered_period -= diff; in hists__decay_entry()
341 if (hists__decay_entry(hists, child)) in hists__decay_entry()
342 hists__delete_entry(hists, child); in hists__decay_entry()
349 static void hists__delete_entry(struct hists *hists, struct hist_entry *he) in hists__delete_entry() argument
358 if (hists__has(hists, need_collapse)) in hists__delete_entry()
359 root_in = &hists->entries_collapsed; in hists__delete_entry()
361 root_in = hists->entries_in; in hists__delete_entry()
362 root_out = &hists->entries; in hists__delete_entry()
368 --hists->nr_entries; in hists__delete_entry()
370 --hists->nr_non_filtered_entries; in hists__delete_entry()
375 void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel) in hists__decay_entries() argument
377 struct rb_node *next = rb_first_cached(&hists->entries); in hists__decay_entries()
385 hists__decay_entry(hists, n))) { in hists__decay_entries()
386 hists__delete_entry(hists, n); in hists__decay_entries()
391 void hists__delete_entries(struct hists *hists) in hists__delete_entries() argument
393 struct rb_node *next = rb_first_cached(&hists->entries); in hists__delete_entries()
400 hists__delete_entry(hists, n); in hists__delete_entries()
404 struct hist_entry *hists__get_entry(struct hists *hists, int idx) in hists__get_entry() argument
406 struct rb_node *next = rb_first_cached(&hists->entries); in hists__get_entry()
574 he->hists->callchain_period += period; in hist_entry__add_callchain_period()
576 he->hists->callchain_non_filtered_period += period; in hist_entry__add_callchain_period()
579 static struct hist_entry *hists__findnew_entry(struct hists *hists, in hists__findnew_entry() argument
592 p = &hists->entries_in->rb_root.rb_node; in hists__findnew_entry()
649 hists->nr_entries++; in hists__findnew_entry()
652 rb_insert_color_cached(&he->rb_node_in, hists->entries_in, leftmost); in hists__findnew_entry()
688 __hists__add_entry(struct hists *hists, in __hists__add_entry() argument
725 .hists = hists, in __hists__add_entry()
734 }, *he = hists__findnew_entry(hists, &entry, al, sample_self); in __hists__add_entry()
736 if (!hists->has_callchains && he && he->callchain_size != 0) in __hists__add_entry()
737 hists->has_callchains = true; in __hists__add_entry()
743 struct hist_entry *hists__add_entry(struct hists *hists, in hists__add_entry() argument
751 return __hists__add_entry(hists, al, sym_parent, bi, mi, NULL, in hists__add_entry()
755 struct hist_entry *hists__add_entry_ops(struct hists *hists, in hists__add_entry_ops() argument
764 return __hists__add_entry(hists, al, sym_parent, bi, mi, NULL, in hists__add_entry_ops()
768 struct hist_entry *hists__add_entry_block(struct hists *hists, in hists__add_entry_block() argument
774 .hists = hists, in hists__add_entry_block()
780 }, *he = hists__findnew_entry(hists, &entry, al, false); in hists__add_entry_block()
818 struct hists *hists = evsel__hists(iter->evsel); in iter_add_single_mem_entry() local
838 he = hists__add_entry(hists, al, iter->parent, NULL, mi, in iter_add_single_mem_entry()
852 struct hists *hists = evsel__hists(evsel); in iter_finish_mem_entry() local
859 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
923 struct hists *hists = evsel__hists(evsel); in iter_add_next_branch_entry() local
941 he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, in iter_add_next_branch_entry()
946 hists__inc_nr_samples(hists, he->filtered); in iter_add_next_branch_entry()
1033 struct hists *hists = evsel__hists(evsel); in iter_add_single_cumulative_entry() local
1039 he = hists__add_entry(hists, al, iter->parent, NULL, NULL, in iter_add_single_cumulative_entry()
1055 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
1096 .hists = evsel__hists(evsel), in iter_add_next_cumulative_entry()
1113 bool fast = hists__has(he_tmp.hists, sym); in iter_add_next_cumulative_entry()
1249 struct hists *hists = left->hists; in hist_entry__cmp() local
1253 hists__for_each_sort_list(hists, fmt) { in hist_entry__cmp()
1255 !perf_hpp__defined_dynamic_entry(fmt, hists)) in hist_entry__cmp()
1269 struct hists *hists = left->hists; in hist_entry__collapse() local
1273 hists__for_each_sort_list(hists, fmt) { in hist_entry__collapse()
1275 !perf_hpp__defined_dynamic_entry(fmt, hists)) in hist_entry__collapse()
1331 if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) { in hist_entry__snprintf_alignment()
1332 const int width = fmt->width(fmt, hpp, he->hists); in hist_entry__snprintf_alignment()
1346 static void hists__apply_filters(struct hists *hists, struct hist_entry *he);
1347 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *he,
1438 hists__apply_filters(he->hists, he); in hist_entry__apply_hierarchy_filters()
1441 static struct hist_entry *hierarchy_insert_entry(struct hists *hists, in hierarchy_insert_entry() argument
1482 hists->nr_entries++; in hierarchy_insert_entry()
1513 static int hists__hierarchy_insert_entry(struct hists *hists, in hists__hierarchy_insert_entry() argument
1523 list_for_each_entry(node, &hists->hpp_formats, list) { in hists__hierarchy_insert_entry()
1529 new_he = hierarchy_insert_entry(hists, root, he, parent, &node->hpp); in hists__hierarchy_insert_entry()
1560 static int hists__collapse_insert_entry(struct hists *hists, in hists__collapse_insert_entry() argument
1571 return hists__hierarchy_insert_entry(hists, root, he); in hists__collapse_insert_entry()
1604 hists->nr_entries++; in hists__collapse_insert_entry()
1611 struct rb_root_cached *hists__get_rotate_entries_in(struct hists *hists) in hists__get_rotate_entries_in() argument
1615 pthread_mutex_lock(&hists->lock); in hists__get_rotate_entries_in()
1617 root = hists->entries_in; in hists__get_rotate_entries_in()
1618 if (++hists->entries_in > &hists->entries_in_array[1]) in hists__get_rotate_entries_in()
1619 hists->entries_in = &hists->entries_in_array[0]; in hists__get_rotate_entries_in()
1621 pthread_mutex_unlock(&hists->lock); in hists__get_rotate_entries_in()
1626 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1628 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1629 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1630 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1631 hists__filter_entry_by_socket(hists, he); in hists__apply_filters()
1634 int hists__collapse_resort(struct hists *hists, struct ui_progress *prog) in hists__collapse_resort() argument
1641 if (!hists__has(hists, need_collapse)) in hists__collapse_resort()
1644 hists->nr_entries = 0; in hists__collapse_resort()
1646 root = hists__get_rotate_entries_in(hists); in hists__collapse_resort()
1657 ret = hists__collapse_insert_entry(hists, &hists->entries_collapsed, n); in hists__collapse_resort()
1667 hists__apply_filters(hists, n); in hists__collapse_resort()
1677 struct hists *hists = a->hists; in hist_entry__sort() local
1681 hists__for_each_sort_list(hists, fmt) { in hist_entry__sort()
1682 if (perf_hpp__should_skip(fmt, a->hists)) in hist_entry__sort()
1693 static void hists__reset_filter_stats(struct hists *hists) in hists__reset_filter_stats() argument
1695 hists->nr_non_filtered_entries = 0; in hists__reset_filter_stats()
1696 hists->stats.total_non_filtered_period = 0; in hists__reset_filter_stats()
1699 void hists__reset_stats(struct hists *hists) in hists__reset_stats() argument
1701 hists->nr_entries = 0; in hists__reset_stats()
1702 hists->stats.total_period = 0; in hists__reset_stats()
1704 hists__reset_filter_stats(hists); in hists__reset_stats()
1707 static void hists__inc_filter_stats(struct hists *hists, struct hist_entry *h) in hists__inc_filter_stats() argument
1709 hists->nr_non_filtered_entries++; in hists__inc_filter_stats()
1710 hists->stats.total_non_filtered_period += h->stat.period; in hists__inc_filter_stats()
1713 void hists__inc_stats(struct hists *hists, struct hist_entry *h) in hists__inc_stats() argument
1716 hists__inc_filter_stats(hists, h); in hists__inc_stats()
1718 hists->nr_entries++; in hists__inc_stats()
1719 hists->stats.total_period += h->stat.period; in hists__inc_stats()
1722 static void hierarchy_recalc_total_periods(struct hists *hists) in hierarchy_recalc_total_periods() argument
1727 node = rb_first_cached(&hists->entries); in hierarchy_recalc_total_periods()
1729 hists->stats.total_period = 0; in hierarchy_recalc_total_periods()
1730 hists->stats.total_non_filtered_period = 0; in hierarchy_recalc_total_periods()
1741 hists->stats.total_period += he->stat.period; in hierarchy_recalc_total_periods()
1743 hists->stats.total_non_filtered_period += he->stat.period; in hierarchy_recalc_total_periods()
1778 static void hists__hierarchy_output_resort(struct hists *hists, in hists__hierarchy_output_resort() argument
1800 hists->nr_entries++; in hists__hierarchy_output_resort()
1802 hists->nr_non_filtered_entries++; in hists__hierarchy_output_resort()
1803 hists__calc_col_len(hists, he); in hists__hierarchy_output_resort()
1807 hists__hierarchy_output_resort(hists, prog, in hists__hierarchy_output_resort()
1873 perf_hpp__defined_dynamic_entry(fmt, he->hists)) in __hists__insert_output_entry()
1878 static void output_resort(struct hists *hists, struct ui_progress *prog, in output_resort() argument
1888 callchain_total = hists->callchain_period; in output_resort()
1890 callchain_total = hists->callchain_non_filtered_period; in output_resort()
1894 hists__reset_stats(hists); in output_resort()
1895 hists__reset_col_len(hists); in output_resort()
1898 hists__hierarchy_output_resort(hists, prog, in output_resort()
1899 &hists->entries_collapsed, in output_resort()
1900 &hists->entries, in output_resort()
1903 hierarchy_recalc_total_periods(hists); in output_resort()
1907 if (hists__has(hists, need_collapse)) in output_resort()
1908 root = &hists->entries_collapsed; in output_resort()
1910 root = hists->entries_in; in output_resort()
1913 hists->entries = RB_ROOT_CACHED; in output_resort()
1922 __hists__insert_output_entry(&hists->entries, n, min_callchain_hits, use_callchain); in output_resort()
1923 hists__inc_stats(hists, n); in output_resort()
1926 hists__calc_col_len(hists, n); in output_resort()
1953 void hists__output_resort(struct hists *hists, struct ui_progress *prog) in hists__output_resort() argument
1955 output_resort(hists, prog, symbol_conf.use_callchain, NULL, NULL); in hists__output_resort()
1958 void hists__output_resort_cb(struct hists *hists, struct ui_progress *prog, in hists__output_resort_cb() argument
1961 output_resort(hists, prog, symbol_conf.use_callchain, cb, NULL); in hists__output_resort_cb()
2045 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h, in hists__remove_entry_filter() argument
2080 hists->stats.nr_non_filtered_samples += h->stat.nr_events; in hists__remove_entry_filter()
2082 hists__inc_filter_stats(hists, h); in hists__remove_entry_filter()
2083 hists__calc_col_len(hists, h); in hists__remove_entry_filter()
2087 static bool hists__filter_entry_by_dso(struct hists *hists, in hists__filter_entry_by_dso() argument
2090 if (hists->dso_filter != NULL && in hists__filter_entry_by_dso()
2091 (he->ms.map == NULL || he->ms.map->dso != hists->dso_filter)) { in hists__filter_entry_by_dso()
2099 static bool hists__filter_entry_by_thread(struct hists *hists, in hists__filter_entry_by_thread() argument
2102 if (hists->thread_filter != NULL && in hists__filter_entry_by_thread()
2103 he->thread != hists->thread_filter) { in hists__filter_entry_by_thread()
2111 static bool hists__filter_entry_by_symbol(struct hists *hists, in hists__filter_entry_by_symbol() argument
2114 if (hists->symbol_filter_str != NULL && in hists__filter_entry_by_symbol()
2116 hists->symbol_filter_str) == NULL)) { in hists__filter_entry_by_symbol()
2124 static bool hists__filter_entry_by_socket(struct hists *hists, in hists__filter_entry_by_socket() argument
2127 if ((hists->socket_filter > -1) && in hists__filter_entry_by_socket()
2128 (he->socket != hists->socket_filter)) { in hists__filter_entry_by_socket()
2136 typedef bool (*filter_fn_t)(struct hists *hists, struct hist_entry *he);
2138 static void hists__filter_by_type(struct hists *hists, int type, filter_fn_t filter) in hists__filter_by_type() argument
2142 hists->stats.nr_non_filtered_samples = 0; in hists__filter_by_type()
2144 hists__reset_filter_stats(hists); in hists__filter_by_type()
2145 hists__reset_col_len(hists); in hists__filter_by_type()
2147 for (nd = rb_first_cached(&hists->entries); nd; nd = rb_next(nd)) { in hists__filter_by_type()
2150 if (filter(hists, h)) in hists__filter_by_type()
2153 hists__remove_entry_filter(hists, h, type); in hists__filter_by_type()
2198 static void hists__filter_hierarchy(struct hists *hists, int type, const void *arg) in hists__filter_hierarchy() argument
2203 hists->stats.nr_non_filtered_samples = 0; in hists__filter_hierarchy()
2205 hists__reset_filter_stats(hists); in hists__filter_hierarchy()
2206 hists__reset_col_len(hists); in hists__filter_hierarchy()
2208 nd = rb_first_cached(&hists->entries); in hists__filter_hierarchy()
2240 hists__remove_entry_filter(hists, h, type); in hists__filter_hierarchy()
2246 hierarchy_recalc_total_periods(hists); in hists__filter_hierarchy()
2252 nd = rb_first_cached(&hists->entries); in hists__filter_hierarchy()
2257 rb_erase_cached(&h->rb_node, &hists->entries); in hists__filter_hierarchy()
2262 hists->entries = new_root; in hists__filter_hierarchy()
2265 void hists__filter_by_thread(struct hists *hists) in hists__filter_by_thread() argument
2268 hists__filter_hierarchy(hists, HIST_FILTER__THREAD, in hists__filter_by_thread()
2269 hists->thread_filter); in hists__filter_by_thread()
2271 hists__filter_by_type(hists, HIST_FILTER__THREAD, in hists__filter_by_thread()
2275 void hists__filter_by_dso(struct hists *hists) in hists__filter_by_dso() argument
2278 hists__filter_hierarchy(hists, HIST_FILTER__DSO, in hists__filter_by_dso()
2279 hists->dso_filter); in hists__filter_by_dso()
2281 hists__filter_by_type(hists, HIST_FILTER__DSO, in hists__filter_by_dso()
2285 void hists__filter_by_symbol(struct hists *hists) in hists__filter_by_symbol() argument
2288 hists__filter_hierarchy(hists, HIST_FILTER__SYMBOL, in hists__filter_by_symbol()
2289 hists->symbol_filter_str); in hists__filter_by_symbol()
2291 hists__filter_by_type(hists, HIST_FILTER__SYMBOL, in hists__filter_by_symbol()
2295 void hists__filter_by_socket(struct hists *hists) in hists__filter_by_socket() argument
2298 hists__filter_hierarchy(hists, HIST_FILTER__SOCKET, in hists__filter_by_socket()
2299 &hists->socket_filter); in hists__filter_by_socket()
2301 hists__filter_by_type(hists, HIST_FILTER__SOCKET, in hists__filter_by_socket()
2311 void hists__inc_nr_events(struct hists *hists, u32 type) in hists__inc_nr_events() argument
2313 events_stats__inc(&hists->stats, type); in hists__inc_nr_events()
2316 void hists__inc_nr_samples(struct hists *hists, bool filtered) in hists__inc_nr_samples() argument
2318 events_stats__inc(&hists->stats, PERF_RECORD_SAMPLE); in hists__inc_nr_samples()
2320 hists->stats.nr_non_filtered_samples++; in hists__inc_nr_samples()
2323 static struct hist_entry *hists__add_dummy_entry(struct hists *hists, in hists__add_dummy_entry() argument
2333 if (hists__has(hists, need_collapse)) in hists__add_dummy_entry()
2334 root = &hists->entries_collapsed; in hists__add_dummy_entry()
2336 root = hists->entries_in; in hists__add_dummy_entry()
2360 he->hists = hists; in hists__add_dummy_entry()
2365 hists__inc_stats(hists, he); in hists__add_dummy_entry()
2372 static struct hist_entry *add_dummy_hierarchy_entry(struct hists *hists, in add_dummy_hierarchy_entry() argument
2411 he->hists = hists; in add_dummy_hierarchy_entry()
2413 hists__inc_stats(hists, he); in add_dummy_hierarchy_entry()
2419 static struct hist_entry *hists__find_entry(struct hists *hists, in hists__find_entry() argument
2424 if (hists__has(hists, need_collapse)) in hists__find_entry()
2425 n = hists->entries_collapsed.rb_root.rb_node; in hists__find_entry()
2427 n = hists->entries_in->rb_root.rb_node; in hists__find_entry()
2492 void hists__match(struct hists *leader, struct hists *other) in hists__match()
2518 static int hists__link_hierarchy(struct hists *leader_hists, in hists__link_hierarchy()
2533 if (leader->hists == leader_hists) { in hists__link_hierarchy()
2567 int hists__link(struct hists *leader, struct hists *other) in hists__link()
2599 int hists__unlink(struct hists *hists) in hists__unlink() argument
2605 if (hists__has(hists, need_collapse)) in hists__unlink()
2606 root = &hists->entries_collapsed; in hists__unlink()
2608 root = hists->entries_in; in hists__unlink()
2671 u64 hists__total_period(struct hists *hists) in hists__total_period() argument
2673 return symbol_conf.filter_relative ? hists->stats.total_non_filtered_period : in hists__total_period()
2674 hists->stats.total_period; in hists__total_period()
2677 int __hists__scnprintf_title(struct hists *hists, char *bf, size_t size, bool show_freq) in __hists__scnprintf_title() argument
2681 const struct dso *dso = hists->dso_filter; in __hists__scnprintf_title()
2682 struct thread *thread = hists->thread_filter; in __hists__scnprintf_title()
2683 int socket_id = hists->socket_filter; in __hists__scnprintf_title()
2684 unsigned long nr_samples = hists->stats.nr_events[PERF_RECORD_SAMPLE]; in __hists__scnprintf_title()
2685 u64 nr_events = hists->stats.total_period; in __hists__scnprintf_title()
2686 struct evsel *evsel = hists_to_evsel(hists); in __hists__scnprintf_title()
2694 nr_samples = hists->stats.nr_non_filtered_samples; in __hists__scnprintf_title()
2695 nr_events = hists->stats.total_non_filtered_period; in __hists__scnprintf_title()
2705 struct hists *pos_hists = evsel__hists(pos); in __hists__scnprintf_title()
2731 if (hists->uid_filter_str) in __hists__scnprintf_title()
2733 ", UID: %s", hists->uid_filter_str); in __hists__scnprintf_title()
2735 if (hists__has(hists, thread)) { in __hists__scnprintf_title()
2779 int __hists__init(struct hists *hists, struct perf_hpp_list *hpp_list) in __hists__init() argument
2781 memset(hists, 0, sizeof(*hists)); in __hists__init()
2782 hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT_CACHED; in __hists__init()
2783 hists->entries_in = &hists->entries_in_array[0]; in __hists__init()
2784 hists->entries_collapsed = RB_ROOT_CACHED; in __hists__init()
2785 hists->entries = RB_ROOT_CACHED; in __hists__init()
2786 pthread_mutex_init(&hists->lock, NULL); in __hists__init()
2787 hists->socket_filter = -1; in __hists__init()
2788 hists->hpp_list = hpp_list; in __hists__init()
2789 INIT_LIST_HEAD(&hists->hpp_formats); in __hists__init()
2807 static void hists__delete_all_entries(struct hists *hists) in hists__delete_all_entries() argument
2809 hists__delete_entries(hists); in hists__delete_all_entries()
2810 hists__delete_remaining_entries(&hists->entries_in_array[0]); in hists__delete_all_entries()
2811 hists__delete_remaining_entries(&hists->entries_in_array[1]); in hists__delete_all_entries()
2812 hists__delete_remaining_entries(&hists->entries_collapsed); in hists__delete_all_entries()
2817 struct hists *hists = evsel__hists(evsel); in hists_evsel__exit() local
2821 hists__delete_all_entries(hists); in hists_evsel__exit()
2823 list_for_each_entry_safe(node, tmp, &hists->hpp_formats, list) { in hists_evsel__exit()
2835 struct hists *hists = evsel__hists(evsel); in hists_evsel__init() local
2837 __hists__init(hists, &perf_hpp_list); in hists_evsel__init()