Lines Matching refs:ui

44 			    struct unwind_info *ui)  in __report_module()  argument
52 thread__find_symbol(ui->thread, PERF_RECORD_MISC_USER, ip, al); in __report_module()
60 mod = dwfl_addrmodule(ui->dwfl, ip); in __report_module()
70 mod = dwfl_report_elf(ui->dwfl, dso->short_name, dso->long_name, -1, in __report_module()
76 mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1, in __report_module()
87 return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1; in __report_module()
90 static int report_module(u64 ip, struct unwind_info *ui) in report_module() argument
94 return __report_module(&al, ip, ui); in report_module()
101 static int entry(u64 ip, struct unwind_info *ui) in entry() argument
104 struct unwind_entry *e = &ui->entries[ui->idx++]; in entry()
107 if (__report_module(&al, ip, ui)) in entry()
132 static int access_dso_mem(struct unwind_info *ui, Dwarf_Addr addr, in access_dso_mem() argument
138 if (!thread__find_map(ui->thread, PERF_RECORD_MISC_USER, addr, &al)) { in access_dso_mem()
146 size = dso__data_read_addr(al.map->dso, al.map, ui->machine, in access_dso_mem()
155 struct unwind_info *ui = arg; in memory_read() local
156 struct stack_dump *stack = &ui->sample->user_stack; in memory_read()
161 ret = perf_reg_value(&start, &ui->sample->user_regs, PERF_REG_SP); in memory_read()
172 ret = access_dso_mem(ui, addr, result); in memory_read()
198 struct unwind_info *ui = arg; in frame_callback() local
208 report_module(pc, ui); in frame_callback()
218 return entry(pc, ui) || !(--ui->max_stack) ? in frame_callback()
227 struct unwind_info *ui, ui_buf = { in unwind__get_entries() local
241 ui = zalloc(sizeof(ui_buf) + sizeof(ui_buf.entries[0]) * max_stack); in unwind__get_entries()
242 if (!ui) in unwind__get_entries()
245 *ui = ui_buf; in unwind__get_entries()
247 ui->dwfl = dwfl_begin(&offline_callbacks); in unwind__get_entries()
248 if (!ui->dwfl) in unwind__get_entries()
255 err = report_module(ip, ui); in unwind__get_entries()
259 err = !dwfl_attach_state(ui->dwfl, EM_NONE, thread->tid, &callbacks, ui); in unwind__get_entries()
263 err = dwfl_getthread_frames(ui->dwfl, thread->tid, frame_callback, ui); in unwind__get_entries()
265 if (err && ui->max_stack != max_stack) in unwind__get_entries()
271 for (i = 0; i < ui->idx && !err; i++) { in unwind__get_entries()
275 j = ui->idx - i - 1; in unwind__get_entries()
277 err = ui->entries[j].ip ? ui->cb(&ui->entries[j], ui->arg) : 0; in unwind__get_entries()
284 dwfl_end(ui->dwfl); in unwind__get_entries()
285 free(ui); in unwind__get_entries()