Lines Matching full:entry
52 struct browser_entry *entry, in get_member_overhead() argument
55 struct annotated_member *member = entry->data; in get_member_overhead()
70 update_hist_entry(&entry->hists[k++], &h->addr[offset]); in get_member_overhead()
83 struct browser_entry *entry; in add_child_entries() local
86 entry = zalloc(sizeof(*entry)); in add_child_entries()
87 if (entry == NULL) in add_child_entries()
90 entry->hists = calloc(browser->nr_events, sizeof(*entry->hists)); in add_child_entries()
91 if (entry->hists == NULL) { in add_child_entries()
92 free(entry); in add_child_entries()
96 entry->data = member; in add_child_entries()
97 entry->parent = parent; in add_child_entries()
98 entry->indent = indent; in add_child_entries()
99 if (get_member_overhead(adt, entry, evsel) < 0) { in add_child_entries()
100 free(entry); in add_child_entries()
104 INIT_LIST_HEAD(&entry->children); in add_child_entries()
110 list_add_tail(&entry->node, parent_list); in add_child_entries()
113 int nr = add_child_entries(browser, entry, adt, pos, evsel, in add_child_entries()
119 /* add an entry for the closing bracket ("}") */ in add_child_entries()
128 bracket->parent = entry; in add_child_entries()
133 list_add_tail(&bracket->node, &entry->children); in add_child_entries()
137 entry->folded = true; in add_child_entries()
138 entry->nr_entries = 1; in add_child_entries()
145 struct browser_entry *entry; in count_visible_entries() local
147 list_for_each_entry(entry, &browser->entries, node) in count_visible_entries()
148 nr += entry->nr_entries; in count_visible_entries()
180 static struct browser_entry *get_first_child(struct browser_entry *entry) in get_first_child() argument
182 if (list_empty(&entry->children)) in get_first_child()
185 return list_first_entry(&entry->children, struct browser_entry, node); in get_first_child()
188 static struct browser_entry *get_last_child(struct browser_entry *entry) in get_last_child() argument
190 if (list_empty(&entry->children)) in get_last_child()
193 return list_last_entry(&entry->children, struct browser_entry, node); in get_last_child()
196 static bool is_first_child(struct browser_entry *entry) in is_first_child() argument
199 if (entry->parent == NULL) in is_first_child()
202 return get_first_child(entry->parent) == entry; in is_first_child()
205 static bool is_last_child(struct browser_entry *entry) in is_last_child() argument
208 if (entry->parent == NULL) in is_last_child()
211 return get_last_child(entry->parent) == entry; in is_last_child()
215 struct browser_entry *entry) in browser__prev_entry() argument
222 while (entry != first) { in browser__prev_entry()
223 if (is_first_child(entry)) in browser__prev_entry()
224 entry = entry->parent; in browser__prev_entry()
226 entry = list_prev_entry(entry, node); in browser__prev_entry()
227 while (!entry->folded) in browser__prev_entry()
228 entry = get_last_child(entry); in browser__prev_entry()
231 if (!uib->filter || !uib->filter(uib, &entry->node)) in browser__prev_entry()
232 return entry; in browser__prev_entry()
238 struct browser_entry *entry) in browser__next_entry() argument
247 while (entry != last) { in browser__next_entry()
248 if (!entry->folded) in browser__next_entry()
249 entry = get_first_child(entry); in browser__next_entry()
251 while (is_last_child(entry)) in browser__next_entry()
252 entry = entry->parent; in browser__next_entry()
254 entry = list_next_entry(entry, node); in browser__next_entry()
257 if (!uib->filter || !uib->filter(uib, &entry->node)) in browser__next_entry()
258 return entry; in browser__next_entry()
266 struct browser_entry *entry; in browser__seek() local
273 entry = list_first_entry(&browser->entries, typeof(*entry), node); in browser__seek()
274 if (uib->filter && uib->filter(uib, &entry->node)) in browser__seek()
275 entry = browser__next_entry(uib, entry); in browser__seek()
278 entry = list_entry(uib->top, typeof(*entry), node); in browser__seek()
281 entry = list_last_entry(&browser->entries, typeof(*entry), node); in browser__seek()
282 while (!entry->folded) in browser__seek()
283 entry = get_last_child(entry); in browser__seek()
284 if (uib->filter && uib->filter(uib, &entry->node)) in browser__seek()
285 entry = browser__prev_entry(uib, entry); in browser__seek()
291 assert(entry != NULL); in browser__seek()
295 entry = browser__next_entry(uib, entry); in browser__seek()
298 entry = browser__prev_entry(uib, entry); in browser__seek()
301 uib->top = &entry->node; in browser__seek()
307 struct browser_entry *entry, *next; in browser__refresh() local
313 entry = list_entry(uib->top, typeof(*entry), node); in browser__refresh()
316 if (!uib->filter || !uib->filter(uib, &entry->node)) { in browser__refresh()
318 uib->write(uib, entry, row); in browser__refresh()
320 browser->curr = entry; in browser__refresh()
324 next = browser__next_entry(uib, entry); in browser__refresh()
325 if (next == entry) in browser__refresh()
328 entry = next; in browser__refresh()
387 static void browser__write(struct ui_browser *uib, void *entry, int row) in browser__write() argument
390 struct browser_entry *be = entry; in browser__write()
446 struct browser_entry *entry, in annotated_data_browser__fold() argument
451 if (list_empty(&entry->children)) in annotated_data_browser__fold()
453 if (entry->folded && !recursive) in annotated_data_browser__fold()
457 list_for_each_entry(child, &entry->children, node) in annotated_data_browser__fold()
461 entry->nr_entries = 1; in annotated_data_browser__fold()
462 entry->folded = true; in annotated_data_browser__fold()
466 struct browser_entry *entry, in annotated_data_browser__unfold() argument
472 if (list_empty(&entry->children)) in annotated_data_browser__unfold()
474 if (!entry->folded && !recursive) in annotated_data_browser__unfold()
478 list_for_each_entry(child, &entry->children, node) { in annotated_data_browser__unfold()
485 entry->nr_entries = nr_entries; in annotated_data_browser__unfold()
486 entry->folded = false; in annotated_data_browser__unfold()
541 "e Expand/Collapse current entry\n" in annotated_data_browser__run()
602 /* To get the top and current entry */ in hist_entry__annotate_data_tui()