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()
191 hists__new_col_len(hists, HISTC_MEM_DATA_PAGE_SIZE, in hists__calc_col_len()
196 hists__new_col_len(hists, HISTC_MEM_DADDR_SYMBOL, symlen); in hists__calc_col_len()
197 hists__new_col_len(hists, HISTC_MEM_IADDR_SYMBOL, symlen); in hists__calc_col_len()
198 hists__set_unres_dso_col_len(hists, HISTC_MEM_DADDR_DSO); in hists__calc_col_len()
201 hists__new_col_len(hists, HISTC_CGROUP, 6); in hists__calc_col_len()
202 hists__new_col_len(hists, HISTC_CGROUP_ID, 20); in hists__calc_col_len()
203 hists__new_col_len(hists, HISTC_CPU, 3); in hists__calc_col_len()
204 hists__new_col_len(hists, HISTC_SOCKET, 6); in hists__calc_col_len()
205 hists__new_col_len(hists, HISTC_MEM_LOCKED, 6); in hists__calc_col_len()
206 hists__new_col_len(hists, HISTC_MEM_TLB, 22); in hists__calc_col_len()
207 hists__new_col_len(hists, HISTC_MEM_SNOOP, 12); in hists__calc_col_len()
208 hists__new_col_len(hists, HISTC_MEM_LVL, 21 + 3); in hists__calc_col_len()
209 hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12); in hists__calc_col_len()
210 hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12); in hists__calc_col_len()
211 hists__new_col_len(hists, HISTC_MEM_BLOCKED, 10); in hists__calc_col_len()
212 hists__new_col_len(hists, HISTC_LOCAL_INS_LAT, 13); in hists__calc_col_len()
213 hists__new_col_len(hists, HISTC_GLOBAL_INS_LAT, 13); in hists__calc_col_len()
214 hists__new_col_len(hists, HISTC_P_STAGE_CYC, 13); in hists__calc_col_len()
216 hists__new_col_len(hists, HISTC_TIME, 16); in hists__calc_col_len()
218 hists__new_col_len(hists, HISTC_TIME, 12); in hists__calc_col_len()
219 hists__new_col_len(hists, HISTC_CODE_PAGE_SIZE, 6); in hists__calc_col_len()
223 hists__new_col_len(hists, HISTC_SRCLINE, len); in hists__calc_col_len()
227 hists__new_col_len(hists, HISTC_SRCFILE, strlen(h->srcfile)); in hists__calc_col_len()
230 hists__new_col_len(hists, HISTC_TRANSACTION, in hists__calc_col_len()
234 hists__new_col_len(hists, HISTC_TRACE, strlen(h->trace_output)); in hists__calc_col_len()
243 hists__new_col_len(hists, HISTC_CGROUP, strlen(cgrp_name)); in hists__calc_col_len()
247 void hists__output_recalc_col_len(struct hists *hists, int max_rows) in hists__output_recalc_col_len() argument
249 struct rb_node *next = rb_first_cached(&hists->entries); in hists__output_recalc_col_len()
253 hists__reset_col_len(hists); in hists__output_recalc_col_len()
258 hists__calc_col_len(hists, n); in hists__output_recalc_col_len()
323 static void hists__delete_entry(struct hists *hists, struct hist_entry *he);
325 static bool hists__decay_entry(struct hists *hists, struct hist_entry *he) in hists__decay_entry() argument
341 hists->stats.total_period -= diff; in hists__decay_entry()
343 hists->stats.total_non_filtered_period -= diff; in hists__decay_entry()
353 if (hists__decay_entry(hists, child)) in hists__decay_entry()
354 hists__delete_entry(hists, child); in hists__decay_entry()
361 static void hists__delete_entry(struct hists *hists, struct hist_entry *he) in hists__delete_entry() argument
370 if (hists__has(hists, need_collapse)) in hists__delete_entry()
371 root_in = &hists->entries_collapsed; in hists__delete_entry()
373 root_in = hists->entries_in; in hists__delete_entry()
374 root_out = &hists->entries; in hists__delete_entry()
380 --hists->nr_entries; in hists__delete_entry()
382 --hists->nr_non_filtered_entries; in hists__delete_entry()
387 void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel) in hists__decay_entries() argument
389 struct rb_node *next = rb_first_cached(&hists->entries); in hists__decay_entries()
397 hists__decay_entry(hists, n))) { in hists__decay_entries()
398 hists__delete_entry(hists, n); in hists__decay_entries()
403 void hists__delete_entries(struct hists *hists) in hists__delete_entries() argument
405 struct rb_node *next = rb_first_cached(&hists->entries); in hists__delete_entries()
412 hists__delete_entry(hists, n); in hists__delete_entries()
416 struct hist_entry *hists__get_entry(struct hists *hists, int idx) in hists__get_entry() argument
418 struct rb_node *next = rb_first_cached(&hists->entries); in hists__get_entry()
586 he->hists->callchain_period += period; in hist_entry__add_callchain_period()
588 he->hists->callchain_non_filtered_period += period; in hist_entry__add_callchain_period()
591 static struct hist_entry *hists__findnew_entry(struct hists *hists, in hists__findnew_entry() argument
606 p = &hists->entries_in->rb_root.rb_node; in hists__findnew_entry()
663 hists->nr_entries++; in hists__findnew_entry()
666 rb_insert_color_cached(&he->rb_node_in, hists->entries_in, leftmost); in hists__findnew_entry()
702 __hists__add_entry(struct hists *hists, in __hists__add_entry() argument
742 .hists = hists, in __hists__add_entry()
751 }, *he = hists__findnew_entry(hists, &entry, al, sample_self); in __hists__add_entry()
753 if (!hists->has_callchains && he && he->callchain_size != 0) in __hists__add_entry()
754 hists->has_callchains = true; in __hists__add_entry()
760 struct hist_entry *hists__add_entry(struct hists *hists, in hists__add_entry() argument
768 return __hists__add_entry(hists, al, sym_parent, bi, mi, NULL, in hists__add_entry()
772 struct hist_entry *hists__add_entry_ops(struct hists *hists, in hists__add_entry_ops() argument
781 return __hists__add_entry(hists, al, sym_parent, bi, mi, NULL, in hists__add_entry_ops()
785 struct hist_entry *hists__add_entry_block(struct hists *hists, in hists__add_entry_block() argument
791 .hists = hists, in hists__add_entry_block()
797 }, *he = hists__findnew_entry(hists, &entry, al, false); in hists__add_entry_block()
835 struct hists *hists = evsel__hists(iter->evsel); in iter_add_single_mem_entry() local
855 he = hists__add_entry(hists, al, iter->parent, NULL, mi, in iter_add_single_mem_entry()
869 struct hists *hists = evsel__hists(evsel); in iter_finish_mem_entry() local
876 hists__inc_nr_samples(hists, he->filtered); in iter_finish_mem_entry()
940 struct hists *hists = evsel__hists(evsel); in iter_add_next_branch_entry() local
958 he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, in iter_add_next_branch_entry()
963 hists__inc_nr_samples(hists, he->filtered); in iter_add_next_branch_entry()
1050 struct hists *hists = evsel__hists(evsel); in iter_add_single_cumulative_entry() local
1056 he = hists__add_entry(hists, al, iter->parent, NULL, NULL, in iter_add_single_cumulative_entry()
1072 hists__inc_nr_samples(hists, he->filtered); in iter_add_single_cumulative_entry()
1113 .hists = evsel__hists(evsel), in iter_add_next_cumulative_entry()
1130 bool fast = hists__has(he_tmp.hists, sym); in iter_add_next_cumulative_entry()
1266 struct hists *hists = left->hists; in hist_entry__cmp() local
1270 hists__for_each_sort_list(hists, fmt) { in hist_entry__cmp()
1272 !perf_hpp__defined_dynamic_entry(fmt, hists)) in hist_entry__cmp()
1286 struct hists *hists = left->hists; in hist_entry__collapse() local
1290 hists__for_each_sort_list(hists, fmt) { in hist_entry__collapse()
1292 !perf_hpp__defined_dynamic_entry(fmt, hists)) in hist_entry__collapse()
1348 if (!list_is_last(&fmt->list, &he->hists->hpp_list->fields)) { in hist_entry__snprintf_alignment()
1349 const int width = fmt->width(fmt, hpp, he->hists); in hist_entry__snprintf_alignment()
1363 static void hists__apply_filters(struct hists *hists, struct hist_entry *he);
1364 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *he,
1455 hists__apply_filters(he->hists, he); in hist_entry__apply_hierarchy_filters()
1458 static struct hist_entry *hierarchy_insert_entry(struct hists *hists, in hierarchy_insert_entry() argument
1499 hists->nr_entries++; in hierarchy_insert_entry()
1530 static int hists__hierarchy_insert_entry(struct hists *hists, in hists__hierarchy_insert_entry() argument
1540 list_for_each_entry(node, &hists->hpp_formats, list) { in hists__hierarchy_insert_entry()
1546 new_he = hierarchy_insert_entry(hists, root, he, parent, &node->hpp); in hists__hierarchy_insert_entry()
1577 static int hists__collapse_insert_entry(struct hists *hists, in hists__collapse_insert_entry() argument
1588 return hists__hierarchy_insert_entry(hists, root, he); in hists__collapse_insert_entry()
1621 hists->nr_entries++; in hists__collapse_insert_entry()
1628 struct rb_root_cached *hists__get_rotate_entries_in(struct hists *hists) in hists__get_rotate_entries_in() argument
1632 pthread_mutex_lock(&hists->lock); in hists__get_rotate_entries_in()
1634 root = hists->entries_in; in hists__get_rotate_entries_in()
1635 if (++hists->entries_in > &hists->entries_in_array[1]) in hists__get_rotate_entries_in()
1636 hists->entries_in = &hists->entries_in_array[0]; in hists__get_rotate_entries_in()
1638 pthread_mutex_unlock(&hists->lock); in hists__get_rotate_entries_in()
1643 static void hists__apply_filters(struct hists *hists, struct hist_entry *he) in hists__apply_filters() argument
1645 hists__filter_entry_by_dso(hists, he); in hists__apply_filters()
1646 hists__filter_entry_by_thread(hists, he); in hists__apply_filters()
1647 hists__filter_entry_by_symbol(hists, he); in hists__apply_filters()
1648 hists__filter_entry_by_socket(hists, he); in hists__apply_filters()
1651 int hists__collapse_resort(struct hists *hists, struct ui_progress *prog) in hists__collapse_resort() argument
1658 if (!hists__has(hists, need_collapse)) in hists__collapse_resort()
1661 hists->nr_entries = 0; in hists__collapse_resort()
1663 root = hists__get_rotate_entries_in(hists); in hists__collapse_resort()
1674 ret = hists__collapse_insert_entry(hists, &hists->entries_collapsed, n); in hists__collapse_resort()
1684 hists__apply_filters(hists, n); in hists__collapse_resort()
1694 struct hists *hists = a->hists; in hist_entry__sort() local
1698 hists__for_each_sort_list(hists, fmt) { in hist_entry__sort()
1699 if (perf_hpp__should_skip(fmt, a->hists)) in hist_entry__sort()
1710 static void hists__reset_filter_stats(struct hists *hists) in hists__reset_filter_stats() argument
1712 hists->nr_non_filtered_entries = 0; in hists__reset_filter_stats()
1713 hists->stats.total_non_filtered_period = 0; in hists__reset_filter_stats()
1716 void hists__reset_stats(struct hists *hists) in hists__reset_stats() argument
1718 hists->nr_entries = 0; in hists__reset_stats()
1719 hists->stats.total_period = 0; in hists__reset_stats()
1721 hists__reset_filter_stats(hists); in hists__reset_stats()
1724 static void hists__inc_filter_stats(struct hists *hists, struct hist_entry *h) in hists__inc_filter_stats() argument
1726 hists->nr_non_filtered_entries++; in hists__inc_filter_stats()
1727 hists->stats.total_non_filtered_period += h->stat.period; in hists__inc_filter_stats()
1730 void hists__inc_stats(struct hists *hists, struct hist_entry *h) in hists__inc_stats() argument
1733 hists__inc_filter_stats(hists, h); in hists__inc_stats()
1735 hists->nr_entries++; in hists__inc_stats()
1736 hists->stats.total_period += h->stat.period; in hists__inc_stats()
1739 static void hierarchy_recalc_total_periods(struct hists *hists) in hierarchy_recalc_total_periods() argument
1744 node = rb_first_cached(&hists->entries); in hierarchy_recalc_total_periods()
1746 hists->stats.total_period = 0; in hierarchy_recalc_total_periods()
1747 hists->stats.total_non_filtered_period = 0; in hierarchy_recalc_total_periods()
1758 hists->stats.total_period += he->stat.period; in hierarchy_recalc_total_periods()
1760 hists->stats.total_non_filtered_period += he->stat.period; in hierarchy_recalc_total_periods()
1795 static void hists__hierarchy_output_resort(struct hists *hists, in hists__hierarchy_output_resort() argument
1817 hists->nr_entries++; in hists__hierarchy_output_resort()
1819 hists->nr_non_filtered_entries++; in hists__hierarchy_output_resort()
1820 hists__calc_col_len(hists, he); in hists__hierarchy_output_resort()
1824 hists__hierarchy_output_resort(hists, prog, in hists__hierarchy_output_resort()
1890 perf_hpp__defined_dynamic_entry(fmt, he->hists)) in __hists__insert_output_entry()
1895 static void output_resort(struct hists *hists, struct ui_progress *prog, in output_resort() argument
1905 callchain_total = hists->callchain_period; in output_resort()
1907 callchain_total = hists->callchain_non_filtered_period; in output_resort()
1911 hists__reset_stats(hists); in output_resort()
1912 hists__reset_col_len(hists); in output_resort()
1915 hists__hierarchy_output_resort(hists, prog, in output_resort()
1916 &hists->entries_collapsed, in output_resort()
1917 &hists->entries, in output_resort()
1920 hierarchy_recalc_total_periods(hists); in output_resort()
1924 if (hists__has(hists, need_collapse)) in output_resort()
1925 root = &hists->entries_collapsed; in output_resort()
1927 root = hists->entries_in; in output_resort()
1930 hists->entries = RB_ROOT_CACHED; in output_resort()
1939 __hists__insert_output_entry(&hists->entries, n, min_callchain_hits, use_callchain); in output_resort()
1940 hists__inc_stats(hists, n); in output_resort()
1943 hists__calc_col_len(hists, n); in output_resort()
1970 void hists__output_resort(struct hists *hists, struct ui_progress *prog) in hists__output_resort() argument
1972 output_resort(hists, prog, symbol_conf.use_callchain, NULL, NULL); in hists__output_resort()
1975 void hists__output_resort_cb(struct hists *hists, struct ui_progress *prog, in hists__output_resort_cb() argument
1978 output_resort(hists, prog, symbol_conf.use_callchain, cb, NULL); in hists__output_resort_cb()
2062 static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h, in hists__remove_entry_filter() argument
2097 hists->stats.nr_non_filtered_samples += h->stat.nr_events; in hists__remove_entry_filter()
2099 hists__inc_filter_stats(hists, h); in hists__remove_entry_filter()
2100 hists__calc_col_len(hists, h); in hists__remove_entry_filter()
2104 static bool hists__filter_entry_by_dso(struct hists *hists, in hists__filter_entry_by_dso() argument
2107 if (hists->dso_filter != NULL && in hists__filter_entry_by_dso()
2108 (he->ms.map == NULL || he->ms.map->dso != hists->dso_filter)) { in hists__filter_entry_by_dso()
2116 static bool hists__filter_entry_by_thread(struct hists *hists, in hists__filter_entry_by_thread() argument
2119 if (hists->thread_filter != NULL && in hists__filter_entry_by_thread()
2120 he->thread != hists->thread_filter) { in hists__filter_entry_by_thread()
2128 static bool hists__filter_entry_by_symbol(struct hists *hists, in hists__filter_entry_by_symbol() argument
2131 if (hists->symbol_filter_str != NULL && in hists__filter_entry_by_symbol()
2133 hists->symbol_filter_str) == NULL)) { in hists__filter_entry_by_symbol()
2141 static bool hists__filter_entry_by_socket(struct hists *hists, in hists__filter_entry_by_socket() argument
2144 if ((hists->socket_filter > -1) && in hists__filter_entry_by_socket()
2145 (he->socket != hists->socket_filter)) { in hists__filter_entry_by_socket()
2153 typedef bool (*filter_fn_t)(struct hists *hists, struct hist_entry *he);
2155 static void hists__filter_by_type(struct hists *hists, int type, filter_fn_t filter) in hists__filter_by_type() argument
2159 hists->stats.nr_non_filtered_samples = 0; in hists__filter_by_type()
2161 hists__reset_filter_stats(hists); in hists__filter_by_type()
2162 hists__reset_col_len(hists); in hists__filter_by_type()
2164 for (nd = rb_first_cached(&hists->entries); nd; nd = rb_next(nd)) { in hists__filter_by_type()
2167 if (filter(hists, h)) in hists__filter_by_type()
2170 hists__remove_entry_filter(hists, h, type); in hists__filter_by_type()
2215 static void hists__filter_hierarchy(struct hists *hists, int type, const void *arg) in hists__filter_hierarchy() argument
2220 hists->stats.nr_non_filtered_samples = 0; in hists__filter_hierarchy()
2222 hists__reset_filter_stats(hists); in hists__filter_hierarchy()
2223 hists__reset_col_len(hists); in hists__filter_hierarchy()
2225 nd = rb_first_cached(&hists->entries); in hists__filter_hierarchy()
2257 hists__remove_entry_filter(hists, h, type); in hists__filter_hierarchy()
2263 hierarchy_recalc_total_periods(hists); in hists__filter_hierarchy()
2269 nd = rb_first_cached(&hists->entries); in hists__filter_hierarchy()
2274 rb_erase_cached(&h->rb_node, &hists->entries); in hists__filter_hierarchy()
2279 hists->entries = new_root; in hists__filter_hierarchy()
2282 void hists__filter_by_thread(struct hists *hists) in hists__filter_by_thread() argument
2285 hists__filter_hierarchy(hists, HIST_FILTER__THREAD, in hists__filter_by_thread()
2286 hists->thread_filter); in hists__filter_by_thread()
2288 hists__filter_by_type(hists, HIST_FILTER__THREAD, in hists__filter_by_thread()
2292 void hists__filter_by_dso(struct hists *hists) in hists__filter_by_dso() argument
2295 hists__filter_hierarchy(hists, HIST_FILTER__DSO, in hists__filter_by_dso()
2296 hists->dso_filter); in hists__filter_by_dso()
2298 hists__filter_by_type(hists, HIST_FILTER__DSO, in hists__filter_by_dso()
2302 void hists__filter_by_symbol(struct hists *hists) in hists__filter_by_symbol() argument
2305 hists__filter_hierarchy(hists, HIST_FILTER__SYMBOL, in hists__filter_by_symbol()
2306 hists->symbol_filter_str); in hists__filter_by_symbol()
2308 hists__filter_by_type(hists, HIST_FILTER__SYMBOL, in hists__filter_by_symbol()
2312 void hists__filter_by_socket(struct hists *hists) in hists__filter_by_socket() argument
2315 hists__filter_hierarchy(hists, HIST_FILTER__SOCKET, in hists__filter_by_socket()
2316 &hists->socket_filter); in hists__filter_by_socket()
2318 hists__filter_by_type(hists, HIST_FILTER__SOCKET, in hists__filter_by_socket()
2333 void hists__inc_nr_events(struct hists *hists) in hists__inc_nr_events() argument
2335 hists_stats__inc(&hists->stats); in hists__inc_nr_events()
2338 void hists__inc_nr_samples(struct hists *hists, bool filtered) in hists__inc_nr_samples() argument
2340 hists_stats__inc(&hists->stats); in hists__inc_nr_samples()
2342 hists->stats.nr_non_filtered_samples++; in hists__inc_nr_samples()
2345 static struct hist_entry *hists__add_dummy_entry(struct hists *hists, in hists__add_dummy_entry() argument
2355 if (hists__has(hists, need_collapse)) in hists__add_dummy_entry()
2356 root = &hists->entries_collapsed; in hists__add_dummy_entry()
2358 root = hists->entries_in; in hists__add_dummy_entry()
2382 he->hists = hists; in hists__add_dummy_entry()
2387 hists__inc_stats(hists, he); in hists__add_dummy_entry()
2394 static struct hist_entry *add_dummy_hierarchy_entry(struct hists *hists, in add_dummy_hierarchy_entry() argument
2433 he->hists = hists; in add_dummy_hierarchy_entry()
2435 hists__inc_stats(hists, he); in add_dummy_hierarchy_entry()
2441 static struct hist_entry *hists__find_entry(struct hists *hists, in hists__find_entry() argument
2446 if (hists__has(hists, need_collapse)) in hists__find_entry()
2447 n = hists->entries_collapsed.rb_root.rb_node; in hists__find_entry()
2449 n = hists->entries_in->rb_root.rb_node; in hists__find_entry()
2514 void hists__match(struct hists *leader, struct hists *other) in hists__match()
2540 static int hists__link_hierarchy(struct hists *leader_hists, in hists__link_hierarchy()
2555 if (leader->hists == leader_hists) { in hists__link_hierarchy()
2589 int hists__link(struct hists *leader, struct hists *other) in hists__link()
2621 int hists__unlink(struct hists *hists) in hists__unlink() argument
2627 if (hists__has(hists, need_collapse)) in hists__unlink()
2628 root = &hists->entries_collapsed; in hists__unlink()
2630 root = hists->entries_in; in hists__unlink()
2686 struct hists *hists = evsel__hists(pos); in evlist__fprintf_nr_events() local
2688 if (skip_empty && !hists->stats.nr_samples) in evlist__fprintf_nr_events()
2693 "SAMPLE", hists->stats.nr_samples); in evlist__fprintf_nr_events()
2700 u64 hists__total_period(struct hists *hists) in hists__total_period() argument
2702 return symbol_conf.filter_relative ? hists->stats.total_non_filtered_period : in hists__total_period()
2703 hists->stats.total_period; in hists__total_period()
2706 int __hists__scnprintf_title(struct hists *hists, char *bf, size_t size, bool show_freq) in __hists__scnprintf_title() argument
2710 const struct dso *dso = hists->dso_filter; in __hists__scnprintf_title()
2711 struct thread *thread = hists->thread_filter; in __hists__scnprintf_title()
2712 int socket_id = hists->socket_filter; in __hists__scnprintf_title()
2713 unsigned long nr_samples = hists->stats.nr_samples; in __hists__scnprintf_title()
2714 u64 nr_events = hists->stats.total_period; in __hists__scnprintf_title()
2715 struct evsel *evsel = hists_to_evsel(hists); in __hists__scnprintf_title()
2723 nr_samples = hists->stats.nr_non_filtered_samples; in __hists__scnprintf_title()
2724 nr_events = hists->stats.total_non_filtered_period; in __hists__scnprintf_title()
2734 struct hists *pos_hists = evsel__hists(pos); in __hists__scnprintf_title()
2760 if (hists->uid_filter_str) in __hists__scnprintf_title()
2762 ", UID: %s", hists->uid_filter_str); in __hists__scnprintf_title()
2764 if (hists__has(hists, thread)) { in __hists__scnprintf_title()
2808 int __hists__init(struct hists *hists, struct perf_hpp_list *hpp_list) in __hists__init() argument
2810 memset(hists, 0, sizeof(*hists)); in __hists__init()
2811 hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT_CACHED; in __hists__init()
2812 hists->entries_in = &hists->entries_in_array[0]; in __hists__init()
2813 hists->entries_collapsed = RB_ROOT_CACHED; in __hists__init()
2814 hists->entries = RB_ROOT_CACHED; in __hists__init()
2815 pthread_mutex_init(&hists->lock, NULL); in __hists__init()
2816 hists->socket_filter = -1; in __hists__init()
2817 hists->hpp_list = hpp_list; in __hists__init()
2818 INIT_LIST_HEAD(&hists->hpp_formats); in __hists__init()
2836 static void hists__delete_all_entries(struct hists *hists) in hists__delete_all_entries() argument
2838 hists__delete_entries(hists); in hists__delete_all_entries()
2839 hists__delete_remaining_entries(&hists->entries_in_array[0]); in hists__delete_all_entries()
2840 hists__delete_remaining_entries(&hists->entries_in_array[1]); in hists__delete_all_entries()
2841 hists__delete_remaining_entries(&hists->entries_collapsed); in hists__delete_all_entries()
2846 struct hists *hists = evsel__hists(evsel); in hists_evsel__exit() local
2850 hists__delete_all_entries(hists); in hists_evsel__exit()
2852 list_for_each_entry_safe(node, tmp, &hists->hpp_formats, list) { in hists_evsel__exit()
2864 struct hists *hists = evsel__hists(evsel); in hists_evsel__init() local
2866 __hists__init(hists, &perf_hpp_list); in hists_evsel__init()