Lines Matching refs:browser

76 static int add_child_entries(struct annotated_data_browser *browser,  in add_child_entries()  argument
90 entry->hists = calloc(browser->nr_events, sizeof(*entry->hists)); in add_child_entries()
108 parent_list = &browser->entries; in add_child_entries()
113 int nr = add_child_entries(browser, entry, adt, pos, evsel, in add_child_entries()
142 static u32 count_visible_entries(struct annotated_data_browser *browser) in count_visible_entries() argument
147 list_for_each_entry(entry, &browser->entries, node) in count_visible_entries()
153 static int annotated_data_browser__collect_entries(struct annotated_data_browser *browser) in annotated_data_browser__collect_entries() argument
155 struct hist_entry *he = browser->b.priv; in annotated_data_browser__collect_entries()
159 INIT_LIST_HEAD(&browser->entries); in annotated_data_browser__collect_entries()
161 add_child_entries(browser, /*parent=*/NULL, adt, &adt->self, evsel, in annotated_data_browser__collect_entries()
164 browser->b.entries = &browser->entries; in annotated_data_browser__collect_entries()
165 browser->b.nr_entries = count_visible_entries(browser); in annotated_data_browser__collect_entries()
169 static void annotated_data_browser__delete_entries(struct annotated_data_browser *browser) in annotated_data_browser__delete_entries() argument
173 list_for_each_entry_safe(pos, tmp, &browser->entries, node) { in annotated_data_browser__delete_entries()
217 struct annotated_data_browser *browser = get_browser(uib); in browser__prev_entry() local
220 first = list_first_entry(&browser->entries, struct browser_entry, node); in browser__prev_entry()
240 struct annotated_data_browser *browser = get_browser(uib); in browser__next_entry() local
243 last = list_last_entry(&browser->entries, struct browser_entry, node); in browser__next_entry()
265 struct annotated_data_browser *browser = get_browser(uib); in browser__seek() local
273 entry = list_first_entry(&browser->entries, typeof(*entry), node); in browser__seek()
281 entry = list_last_entry(&browser->entries, typeof(*entry), node); in browser__seek()
306 struct annotated_data_browser *browser = get_browser(uib); in browser__refresh() local
320 browser->curr = entry; in browser__refresh()
338 struct annotated_data_browser *browser = get_browser(uib); in browser__show() local
360 2 + 11 * (browser->nr_events - 1), "", in browser__show()
389 struct annotated_data_browser *browser = get_browser(uib); in browser__write() local
403 ui_browser__write_nstring(uib, "", 11 * browser->nr_events); in browser__write()
445 static void annotated_data_browser__fold(struct annotated_data_browser *browser, in annotated_data_browser__fold() argument
458 annotated_data_browser__fold(browser, child, true); in annotated_data_browser__fold()
465 static void annotated_data_browser__unfold(struct annotated_data_browser *browser, in annotated_data_browser__unfold() argument
480 annotated_data_browser__unfold(browser, child, true); in annotated_data_browser__unfold()
489 static void annotated_data_browser__toggle_fold(struct annotated_data_browser *browser, in annotated_data_browser__toggle_fold() argument
492 struct browser_entry *curr = browser->curr; in annotated_data_browser__toggle_fold()
500 browser->b.nr_entries -= curr->nr_entries; in annotated_data_browser__toggle_fold()
503 annotated_data_browser__unfold(browser, curr, recursive); in annotated_data_browser__toggle_fold()
505 annotated_data_browser__fold(browser, curr, recursive); in annotated_data_browser__toggle_fold()
512 browser->b.nr_entries += curr->nr_entries; in annotated_data_browser__toggle_fold()
514 assert(browser->b.nr_entries == count_visible_entries(browser)); in annotated_data_browser__toggle_fold()
517 static int annotated_data_browser__run(struct annotated_data_browser *browser, in annotated_data_browser__run() argument
524 if (browser__show(&browser->b) < 0) in annotated_data_browser__run()
528 key = ui_browser__run(&browser->b, delay_secs); in annotated_data_browser__run()
537 ui_browser__help_window(&browser->b, in annotated_data_browser__run()
546 annotated_data_browser__toggle_fold(browser, in annotated_data_browser__run()
550 annotated_data_browser__toggle_fold(browser, in annotated_data_browser__run()
565 ui_browser__hide(&browser->b); in annotated_data_browser__run()
572 struct annotated_data_browser browser = { in hist_entry__annotate_data_tui() local
595 browser.nr_events = nr; in hist_entry__annotate_data_tui()
598 ret = annotated_data_browser__collect_entries(&browser); in hist_entry__annotate_data_tui()
603 browser__refresh(&browser.b); in hist_entry__annotate_data_tui()
605 annotated_data_browser__toggle_fold(&browser, /*recursive=*/false); in hist_entry__annotate_data_tui()
607 ret = annotated_data_browser__run(&browser, evsel, hbt); in hist_entry__annotate_data_tui()
610 annotated_data_browser__delete_entries(&browser); in hist_entry__annotate_data_tui()