/tools/perf/util/ |
D | event.c | 458 struct addr_location *al) in thread__find_map() argument 464 al->machine = machine; in thread__find_map() 465 al->thread = thread; in thread__find_map() 466 al->addr = addr; in thread__find_map() 467 al->cpumode = cpumode; in thread__find_map() 468 al->filtered = 0; in thread__find_map() 471 al->map = NULL; in thread__find_map() 476 al->level = 'k'; in thread__find_map() 480 al->level = '.'; in thread__find_map() 482 al->level = 'g'; in thread__find_map() [all …]
|
D | symbol_fprintf.c | 20 const struct addr_location *al, in __symbol__fprintf_symname_offs() argument 29 if (al && print_offsets) { in __symbol__fprintf_symname_offs() 30 if (al->addr < sym->end) in __symbol__fprintf_symname_offs() 31 offset = al->addr - sym->start; in __symbol__fprintf_symname_offs() 33 offset = al->addr - al->map->start - sym->start; in __symbol__fprintf_symname_offs() 37 } else if (al && unknown_as_addr) in __symbol__fprintf_symname_offs() 38 return fprintf(fp, "[%#" PRIx64 "]", al->addr); in __symbol__fprintf_symname_offs() 44 const struct addr_location *al, in symbol__fprintf_symname_offs() argument 47 return __symbol__fprintf_symname_offs(sym, al, false, true, fp); in symbol__fprintf_symname_offs() 51 const struct addr_location *al, in __symbol__fprintf_symname() argument [all …]
|
D | unwind-libdw.c | 43 static int __report_module(struct addr_location *al, u64 ip, in __report_module() argument 52 thread__find_symbol(ui->thread, PERF_RECORD_MISC_USER, ip, al); in __report_module() 54 if (al->map) in __report_module() 55 dso = al->map->dso; in __report_module() 65 if (s != al->map->start - al->map->pgoff) in __report_module() 71 al->map->start - al->map->pgoff, false); in __report_module() 77 al->map->start - al->map->pgoff, false); in __report_module() 92 struct addr_location al; in report_module() local 94 return __report_module(&al, ip, ui); in report_module() 105 struct addr_location al; in entry() local [all …]
|
D | db-export.c | 176 static int db_ids_from_al(struct db_export *dbe, struct addr_location *al, in db_ids_from_al() argument 181 if (al->map) { in db_ids_from_al() 182 struct dso *dso = al->map->dso; in db_ids_from_al() 184 err = db_export__dso(dbe, dso, al->machine); in db_ids_from_al() 189 if (!al->sym) { in db_ids_from_al() 190 al->sym = symbol__new(al->addr, 0, 0, 0, "unknown"); in db_ids_from_al() 191 if (al->sym) in db_ids_from_al() 192 dso__insert_symbol(dso, al->sym); in db_ids_from_al() 195 if (al->sym) { in db_ids_from_al() 196 u64 *db_id = symbol__priv(al->sym); in db_ids_from_al() [all …]
|
D | annotate.c | 1038 struct annotation_line *al = notes->offsets[offset]; in annotation__count_and_fill() local 1040 if (al && al->ipc == 0.0) { in annotation__count_and_fill() 1041 al->ipc = ipc; in annotation__count_and_fill() 1072 struct annotation_line *al; in annotation__compute_ipc() local 1076 al = notes->offsets[offset]; in annotation__compute_ipc() 1077 if (al && ch->num_aggr) { in annotation__compute_ipc() 1078 al->cycles = ch->cycles_aggr / ch->num_aggr; in annotation__compute_ipc() 1079 al->cycles_max = ch->cycles_max; in annotation__compute_ipc() 1080 al->cycles_min = ch->cycles_min; in annotation__compute_ipc() 1150 static void annotation_line__delete(struct annotation_line *al) in annotation_line__delete() argument [all …]
|
D | evsel_fprintf.c | 193 int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al, in sample__fprintf_sym() argument 217 printed += __symbol__fprintf_symname_offs(al->sym, al, in sample__fprintf_sym() 221 printed += __symbol__fprintf_symname(al->sym, al, in sample__fprintf_sym() 228 printed += map__fprintf_dsoname(al->map, fp); in sample__fprintf_sym() 233 printed += map__fprintf_srcline(al->map, al->addr, "\n ", fp); in sample__fprintf_sym()
|
D | thread.c | 408 struct addr_location *al) in thread__find_cpumode_addr_location() argument 419 thread__find_symbol(thread, cpumodes[i], addr, al); in thread__find_cpumode_addr_location() 420 if (al->map) in thread__find_cpumode_addr_location() 440 struct addr_location al; in thread__memcpy() local 446 if (!thread__find_map(thread, cpumode, ip, &al) || !al.map->dso || in thread__memcpy() 447 al.map->dso->data.status == DSO_DATA_STATUS_ERROR || in thread__memcpy() 448 map__load(al.map) < 0) in thread__memcpy() 451 offset = al.map->map_ip(al.map, ip); in thread__memcpy() 453 *is64bit = al.map->dso->is_64_bit; in thread__memcpy() 455 return dso__data_read_offset(al.map->dso, machine, offset, buf, len); in thread__memcpy()
|
D | hist.c | 566 struct addr_location *al, in hists__findnew_entry() argument 640 he_stat__add_cpumode_period(&he->stat, al->cpumode, period); in hists__findnew_entry() 642 he_stat__add_cpumode_period(he->stat_acc, al->cpumode, period); in hists__findnew_entry() 674 struct addr_location *al, in __hists__add_entry() argument 683 struct namespaces *ns = thread__namespaces(al->thread); in __hists__add_entry() 685 .thread = al->thread, in __hists__add_entry() 686 .comm = thread__comm(al->thread), in __hists__add_entry() 692 .map = al->map, in __hists__add_entry() 693 .sym = al->sym, in __hists__add_entry() 695 .srcline = (char *) al->srcline, in __hists__add_entry() [all …]
|
D | thread.h | 100 struct addr_location *al); 102 struct addr_location *al); 105 u64 addr, struct addr_location *al); 107 u64 addr, struct addr_location *al); 110 struct addr_location *al);
|
D | annotate.h | 154 struct annotation_line al; member 178 static inline struct disasm_line *disasm_line(struct annotation_line *al) in disasm_line() argument 180 return al ? container_of(al, struct disasm_line, al) : NULL; in disasm_line() 213 void annotation_line__write(struct annotation_line *al, struct annotation *notes, 311 static inline bool annotation_line__filter(struct annotation_line *al, struct annotation *notes) in annotation_line__filter() argument 313 return notes->options->hide_src_code && al->offset == -1; in annotation_line__filter()
|
D | callchain.c | 1085 struct evsel *evsel, struct addr_location *al, in sample__resolve_callchain() argument 1093 return thread__resolve_callchain(al->thread, cursor, evsel, sample, in sample__resolve_callchain() 1094 parent, al, max_stack); in sample__resolve_callchain() 1107 int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node, in fill_callchain_info() argument 1110 al->map = node->map; in fill_callchain_info() 1111 al->sym = node->sym; in fill_callchain_info() 1112 al->srcline = node->srcline; in fill_callchain_info() 1113 al->addr = node->ip; in fill_callchain_info() 1115 if (al->sym == NULL) { in fill_callchain_info() 1118 if (al->map == NULL) in fill_callchain_info() [all …]
|
D | unwind-libunwind-local.c | 369 struct addr_location al; in find_map() local 370 return thread__find_map(ui->thread, PERF_RECORD_MISC_USER, ip, &al); in find_map() 576 struct addr_location al; in entry() local 578 e.sym = thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al); in entry() 580 e.map = al.map; in entry() 583 al.sym ? al.sym->name : "''", in entry() 585 al.map ? al.map->map_ip(al.map, ip) : (u64) 0); in entry()
|
D | machine.c | 1928 struct addr_location al; in ip__resolve_ams() local 1930 memset(&al, 0, sizeof(al)); in ip__resolve_ams() 1938 thread__find_cpumode_addr_location(thread, ip, &al); in ip__resolve_ams() 1941 ams->al_addr = al.addr; in ip__resolve_ams() 1942 ams->sym = al.sym; in ip__resolve_ams() 1943 ams->map = al.map; in ip__resolve_ams() 1951 struct addr_location al; in ip__resolve_data() local 1953 memset(&al, 0, sizeof(al)); in ip__resolve_data() 1955 thread__find_symbol(thread, m, addr, &al); in ip__resolve_data() 1958 ams->al_addr = al.addr; in ip__resolve_data() [all …]
|
/tools/perf/ui/browsers/ |
D | annotate.c | 49 struct annotation_line *al = list_entry(entry, struct annotation_line, node); in disasm_line__filter() local 50 return annotation_line__filter(al, notes); in disasm_line__filter() 100 struct annotation_line *al = list_entry(entry, struct annotation_line, node); in annotate_browser__write() local 122 annotation_line__write(al, notes, &ops, ab->opts); in annotate_browser__write() 125 ab->selection = al; in annotate_browser__write() 130 struct disasm_line *pos = list_prev_entry(cursor, al.node); in is_fused() 194 from = cursor->al.idx_asm; in annotate_browser__draw_current_jump() 197 from = (u64)cursor->al.idx; in annotate_browser__draw_current_jump() 245 struct annotation_line *al) in disasm_rb_tree__insert() argument 256 if (disasm__cmp(al, l, browser->opts->percent_type) < 0) in disasm_rb_tree__insert() [all …]
|
/tools/perf/ |
D | builtin-mem.c | 159 struct addr_location al; in dump_raw_samples() local 162 if (machine__resolve(machine, &al, sample) < 0) { in dump_raw_samples() 168 if (al.filtered || (mem->hide_unresolved && al.sym == NULL)) in dump_raw_samples() 171 if (al.map != NULL) in dump_raw_samples() 172 al.map->dso->hit = 1; in dump_raw_samples() 200 al.map ? (al.map->dso ? al.map->dso->long_name : "???") : "???", in dump_raw_samples() 201 al.sym ? al.sym->name : "???"); in dump_raw_samples() 225 al.map ? (al.map->dso ? al.map->dso->long_name : "???") : "???", in dump_raw_samples() 226 al.sym ? al.sym->name : "???"); in dump_raw_samples() 229 addr_location__put(&al); in dump_raw_samples()
|
D | builtin-annotate.c | 129 static void process_branch_stack(struct branch_stack *bs, struct addr_location *al, in process_branch_stack() argument 139 bi = sample__resolve_bstack(sample, al); in process_branch_stack() 156 struct addr_location *al __maybe_unused, in hist_iter__branch_callback() 180 struct addr_location *al __maybe_unused, in process_branch_callback() 204 hist__account_cycles(sample->branch_stack, al, sample, false); in process_branch_callback() 217 struct addr_location *al, in perf_evsel__add_sample() argument 227 (al->sym == NULL || in perf_evsel__add_sample() 228 strcmp(ann->sym_hist_filter, al->sym->name) != 0)) { in perf_evsel__add_sample() 234 if (al->sym != NULL) { in perf_evsel__add_sample() 235 rb_erase_cached(&al->sym->rb_node, in perf_evsel__add_sample() [all …]
|
D | builtin-script.c | 880 struct addr_location al; in grab_bb() local 903 memset(&al, 0, sizeof(al)); in grab_bb() 912 if (!thread__find_map(thread, *cpumode, start, &al) || !al.map->dso) { in grab_bb() 916 if (al.map->dso->data.status == DSO_DATA_STATUS_ERROR) { in grab_bb() 922 map__load(al.map); in grab_bb() 924 offset = al.map->map_ip(al.map, start); in grab_bb() 925 len = dso__data_read_offset(al.map->dso, machine, offset, (u8 *)buffer, in grab_bb() 928 *is64bit = al.map->dso->is_64_bit; in grab_bb() 937 struct addr_location al; in print_srccode() local 940 memset(&al, 0, sizeof(al)); in print_srccode() [all …]
|
/tools/perf/tests/ |
D | code-reading.c | 238 struct addr_location al; in read_object_code() local 250 if (!thread__find_map(thread, cpumode, addr, &al) || !al.map->dso) { in read_object_code() 260 pr_debug("File is: %s\n", al.map->dso->long_name); in read_object_code() 262 if (al.map->dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS && in read_object_code() 263 !dso__is_kcore(al.map->dso)) { in read_object_code() 268 pr_debug("On file address is: %#"PRIx64"\n", al.addr); in read_object_code() 274 if (addr + len > al.map->end) in read_object_code() 275 len = al.map->end - addr; in read_object_code() 278 ret_len = dso__data_read_offset(al.map->dso, thread->mg->machine, in read_object_code() 279 al.addr, buf1, len); in read_object_code() [all …]
|
D | hists_link.c | 67 struct addr_location al; in add_hist_entries() local 86 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries() 89 he = hists__add_entry(hists, &al, NULL, in add_hist_entries() 92 addr_location__put(&al); in add_hist_entries() 96 fake_common_samples[k].thread = al.thread; in add_hist_entries() 97 fake_common_samples[k].map = al.map; in add_hist_entries() 98 fake_common_samples[k].sym = al.sym; in add_hist_entries() 105 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries() 108 he = hists__add_entry(hists, &al, NULL, in add_hist_entries() 111 addr_location__put(&al); in add_hist_entries() [all …]
|
D | mmap-thread-lookup.c | 187 struct addr_location al; in mmap_events() local 195 (unsigned long) (td->map + 1), &al); in mmap_events() 199 if (!al.map) { in mmap_events() 205 pr_debug("map %p, addr %" PRIx64 "\n", al.map, al.map->start); in mmap_events()
|
D | hists_filter.c | 52 struct addr_location al; in add_hist_entries() local 81 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries() 84 al.socket = fake_samples[i].socket; in add_hist_entries() 85 if (hist_entry_iter__add(&iter, &al, in add_hist_entries() 87 addr_location__put(&al); in add_hist_entries() 91 fake_samples[i].thread = al.thread; in add_hist_entries() 92 fake_samples[i].map = al.map; in add_hist_entries() 93 fake_samples[i].sym = al.sym; in add_hist_entries()
|
D | hists_cumulate.c | 82 struct addr_location al; in add_hist_entries() local 105 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries() 108 if (hist_entry_iter__add(&iter, &al, sysctl_perf_event_max_stack, in add_hist_entries() 110 addr_location__put(&al); in add_hist_entries() 114 fake_samples[i].thread = al.thread; in add_hist_entries() 115 fake_samples[i].map = al.map; in add_hist_entries() 116 fake_samples[i].sym = al.sym; in add_hist_entries()
|
/tools/perf/ui/gtk/ |
D | annotate.c | 38 if (dl->al.offset == (s64) -1) in perf_gtk__get_percent() 42 if (!symbol_conf.event_group && !symhist->addr[dl->al.offset].nr_samples) in perf_gtk__get_percent() 45 percent = 100.0 * symhist->addr[dl->al.offset].nr_samples / symhist->nr_samples; in perf_gtk__get_percent() 64 if (dl->al.offset == (s64) -1) in perf_gtk__get_offset() 67 return scnprintf(buf, size, "%"PRIx64, start + dl->al.offset); in perf_gtk__get_offset() 73 char *line = g_markup_escape_text(dl->al.line, -1); in perf_gtk__get_line() 81 if (dl->al.offset != (s64) -1) in perf_gtk__get_line() 126 list_for_each_entry(pos, ¬es->src->source, al.node) { in perf_gtk__annotate_symbol() 155 list_for_each_entry_safe(pos, n, ¬es->src->source, al.node) { in perf_gtk__annotate_symbol() 156 list_del_init(&pos->al.node); in perf_gtk__annotate_symbol()
|
/tools/perf/arch/powerpc/util/ |
D | skip-callchain-idx.c | 244 struct addr_location al; in arch_skip_callchain_idx() local 255 thread__find_symbol(thread, PERF_RECORD_MISC_USER, ip, &al); in arch_skip_callchain_idx() 257 if (al.map) in arch_skip_callchain_idx() 258 dso = al.map->dso; in arch_skip_callchain_idx() 265 rc = check_return_addr(dso, al.map->start, ip); in arch_skip_callchain_idx() 268 dso->long_name, al.sym->name, ip, rc); in arch_skip_callchain_idx()
|
/tools/perf/util/scripting-engines/ |
D | trace-event-python.c | 396 struct addr_location *al) in python_process_callchain() argument 407 if (thread__resolve_callchain(al->thread, &callchain_cursor, evsel, in python_process_callchain() 479 struct addr_location al; in python_process_brstack() local 502 br->entries[i].from, &al); in python_process_brstack() 503 dsoname = get_dsoname(al.map); in python_process_brstack() 508 br->entries[i].to, &al); in python_process_brstack() 509 dsoname = get_dsoname(al.map); in python_process_brstack() 521 static unsigned long get_offset(struct symbol *sym, struct addr_location *al) in get_offset() argument 525 if (al->addr < sym->end) in get_offset() 526 offset = al->addr - sym->start; in get_offset() [all …]
|