/tools/perf/util/ |
D | map.h | 27 struct map { struct 47 u64 (*map_ip)(struct map *, u64); argument 49 u64 (*unmap_ip)(struct map *, u64); argument 79 static inline struct kmap *map__kmap(struct map *map) in map__kmap() argument 81 return (struct kmap *)(map + 1); in map__kmap() 84 static inline u64 map__map_ip(struct map *map, u64 ip) in map__map_ip() argument 86 return ip - map->start + map->pgoff; in map__map_ip() 89 static inline u64 map__unmap_ip(struct map *map, u64 ip) in map__unmap_ip() argument 91 return ip + map->start - map->pgoff; in map__unmap_ip() 94 static inline u64 identity__map_ip(struct map *map __maybe_unused, u64 ip) in identity__map_ip() [all …]
|
D | map.c | 125 void map__init(struct map *map, enum map_type type, in map__init() argument 128 map->type = type; in map__init() 129 map->start = start; in map__init() 130 map->end = end; in map__init() 131 map->pgoff = pgoff; in map__init() 132 map->reloc = 0; in map__init() 133 map->dso = dso; in map__init() 134 map->map_ip = map__map_ip; in map__init() 135 map->unmap_ip = map__unmap_ip; in map__init() 136 RB_CLEAR_NODE(&map->rb_node); in map__init() [all …]
|
D | cpumap.h | 12 int map[]; member 17 void cpu_map__delete(struct cpu_map *map); 19 size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp); 20 int cpu_map__get_socket(struct cpu_map *map, int idx); 21 int cpu_map__get_core(struct cpu_map *map, int idx); 29 return sock->map[s]; in cpu_map__socket() 42 static inline int cpu_map__nr(const struct cpu_map *map) in cpu_map__nr() argument 44 return map ? map->nr : 1; in cpu_map__nr() 47 static inline bool cpu_map__empty(const struct cpu_map *map) in cpu_map__empty() argument 49 return map ? map->map[0] == -1 : true; in cpu_map__empty()
|
D | symbol.c | 25 static int dso__load_kernel_sym(struct dso *dso, struct map *map, 27 static int dso__load_guest_kernel_sym(struct dso *dso, struct map *map, 199 struct map *prev, *curr; in __map_groups__fixup_end() 205 curr = rb_entry(prevnd, struct map, rb_node); in __map_groups__fixup_end() 209 curr = rb_entry(nd, struct map, rb_node); in __map_groups__fixup_end() 269 offset = al->addr - al->map->start - sym->start; in symbol__fprintf_symname_offs() 524 struct map *map; member 568 struct rb_root *root = &a->dso->symbols[a->map->type]; in map__process_kallsym_symbol() 570 if (!symbol_type__is_a(type, a->map->type)) in map__process_kallsym_symbol() 596 struct map *map) in dso__load_all_kallsyms() argument [all …]
|
D | annotate.h | 142 int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize); 146 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym); 147 int symbol__annotate_printf(struct symbol *sym, struct map *map, 156 int symbol__tty_annotate(struct symbol *sym, struct map *map, 161 int symbol__tui_annotate(struct symbol *sym, struct map *map, 166 struct map *map __maybe_unused, in symbol__tui_annotate()
|
D | cpumap.c | 22 cpus->map[i] = i; in cpu_map__default_new() 37 memcpy(cpus->map, tmp_cpus, payload_size); in cpu_map__trim_new() 179 size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp) in cpu_map__fprintf() argument 183 map->nr, map->nr > 1 ? "s" : ""); in cpu_map__fprintf() 184 for (i = 0; i < map->nr; ++i) in cpu_map__fprintf() 185 printed += fprintf(fp, "%s%d", i ? ", " : "", map->map[i]); in cpu_map__fprintf() 196 cpus->map[0] = -1; in cpu_map__dummy_new() 202 void cpu_map__delete(struct cpu_map *map) in cpu_map__delete() argument 204 free(map); in cpu_map__delete() 207 int cpu_map__get_socket(struct cpu_map *map, int idx) in cpu_map__get_socket() argument [all …]
|
D | symbol.h | 172 struct map *map; member 179 struct map *map; member 200 struct map *map; member 240 int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter); 241 int dso__load_vmlinux(struct dso *dso, struct map *map, 244 int dso__load_vmlinux_path(struct dso *dso, struct map *map, 246 int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map, 281 int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, 285 struct map *map, symbol_filter_t filter);
|
D | unwind-libunwind.c | 283 static struct map *find_map(unw_word_t ip, struct unwind_info *ui) in find_map() 289 return al.map; in find_map() 297 struct map *map; in find_proc_info() local 301 map = find_map(ip, ui); in find_proc_info() 302 if (!map || !map->dso) in find_proc_info() 305 pr_debug("unwind: find_proc_info dso %s\n", map->dso->name); in find_proc_info() 308 if (!read_unwind_spec_eh_frame(map->dso, ui->machine, in find_proc_info() 312 di.start_ip = map->start; in find_proc_info() 313 di.end_ip = map->end; in find_proc_info() 314 di.u.rti.segbase = map->start + segbase; in find_proc_info() [all …]
|
D | unwind-libdw.c | 33 if (al->map) in __report_module() 34 dso = al->map->dso; in __report_module() 42 dso->long_name, -1, al->map->start, in __report_module() 65 e.map = al.map; in entry() 71 al.map ? al.map->map_ip(al.map, ip) : (u64) 0); in entry() 94 if (!al.map) { in access_dso_mem() 99 if (!al.map->dso) in access_dso_mem() 102 size = dso__data_read_addr(al.map->dso, al.map, ui->machine, in access_dso_mem()
|
D | sort.c | 125 static int64_t _sort__dso_cmp(struct map *map_l, struct map *map_r) in _sort__dso_cmp() 148 return _sort__dso_cmp(right->ms.map, left->ms.map); in sort__dso_cmp() 151 static int _hist_entry__dso_snprintf(struct map *map, char *bf, in _hist_entry__dso_snprintf() argument 154 if (map && map->dso) { in _hist_entry__dso_snprintf() 155 const char *dso_name = !verbose ? map->dso->short_name : in _hist_entry__dso_snprintf() 156 map->dso->long_name; in _hist_entry__dso_snprintf() 166 return _hist_entry__dso_snprintf(he->ms.map, bf, size, width); in hist_entry__dso_snprintf() 229 static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym, in _hist_entry__sym_snprintf() argument 236 char o = map ? dso__symtab_origin(map->dso) : '!'; in _hist_entry__sym_snprintf() 242 if (sym && map) { in _hist_entry__sym_snprintf() [all …]
|
D | machine.c | 463 struct map *machine__new_module(struct machine *machine, u64 start, in machine__new_module() 466 struct map *map; in machine__new_module() local 472 map = map__new2(start, dso, MAP__FUNCTION); in machine__new_module() 473 if (map == NULL) in machine__new_module() 480 map_groups__insert(&machine->kmaps, map); in machine__new_module() 481 return map; in machine__new_module() 760 struct map *map = machine->vmlinux_maps[type]; in machine__load_kallsyms() local 761 int ret = dso__load_kallsyms(map->dso, filename, map, filter); in machine__load_kallsyms() 764 dso__set_loaded(map->dso, type); in machine__load_kallsyms() 779 struct map *map = machine->vmlinux_maps[type]; in machine__load_vmlinux_path() local [all …]
|
D | event.c | 297 struct map *pos = rb_entry(nd, struct map, rb_node); in perf_event__synthesize_modules() 418 threads->map[thread], 0, in perf_event__synthesize_thread_map() 429 if ((int) comm_event->comm.pid != threads->map[thread]) { in perf_event__synthesize_thread_map() 434 if ((int) comm_event->comm.pid == threads->map[j]) { in perf_event__synthesize_thread_map() 558 struct map *map; in perf_event__synthesize_kernel_mmap() local 589 map = machine->vmlinux_maps[MAP__FUNCTION]; in perf_event__synthesize_kernel_mmap() 590 kmap = map__kmap(map); in perf_event__synthesize_kernel_mmap() 598 event->mmap.start = map->start; in perf_event__synthesize_kernel_mmap() 599 event->mmap.len = map->end - event->mmap.start; in perf_event__synthesize_kernel_mmap() 748 al->map = NULL; in thread__find_addr_map() [all …]
|
D | annotate.c | 429 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym) in symbol__annotate_init() 473 static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map, in __symbol__inc_addr_samples() argument 479 pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr)); in __symbol__inc_addr_samples() 495 static int symbol__inc_addr_samples(struct symbol *sym, struct map *map, in symbol__inc_addr_samples() argument 509 return __symbol__inc_addr_samples(sym, map, notes, evidx, addr); in symbol__inc_addr_samples() 514 return symbol__inc_addr_samples(ams->sym, ams->map, evidx, ams->al_addr); in addr_map_symbol__inc_samples() 519 return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip); in hist_entry__inc_addr_samples() 790 static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, in symbol__parse_objdump_line() argument 835 u64 start = map__rip_2objdump(map, sym->start), in symbol__parse_objdump_line() 836 end = map__rip_2objdump(map, sym->end); in symbol__parse_objdump_line() [all …]
|
/tools/perf/tests/ |
D | mmap-thread-lookup.c | 22 void *map; member 30 void *map; in thread_init() local 32 map = mmap(NULL, page_size, in thread_init() 36 if (map == MAP_FAILED) { in thread_init() 41 td->map = map; in thread_init() 44 pr_debug("tid = %d, map = %p\n", td->tid, map); in thread_init() 69 munmap(td->map, page_size); in thread_fn() 116 munmap(td0->map, page_size); in threads_destroy() 137 struct thread_map *map; in synth_process() local 140 map = thread_map__new_by_pid(getpid()); in synth_process() [all …]
|
D | open-syscall-all-cpus.c | 51 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__open_syscall_event_on_all_cpus() 52 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__open_syscall_event_on_all_cpus() 56 CPU_SET(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus() 59 cpus->map[cpu], in test__open_syscall_event_on_all_cpus() 67 CPU_CLR(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus() 85 if (cpus->map[cpu] >= CPU_SETSIZE) in test__open_syscall_event_on_all_cpus() 97 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val); in test__open_syscall_event_on_all_cpus()
|
D | code-reading.c | 150 if (!al.map || !al.map->dso) { in read_object_code() 155 pr_debug("File is: %s\n", al.map->dso->long_name); in read_object_code() 157 if (al.map->dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS && in read_object_code() 158 !dso__is_kcore(al.map->dso)) { in read_object_code() 169 if (addr + len > al.map->end) in read_object_code() 170 len = al.map->end - addr; in read_object_code() 173 ret_len = dso__data_read_offset(al.map->dso, machine, al.addr, buf1, in read_object_code() 184 if (map__load(al.map, NULL)) in read_object_code() 188 if (dso__is_kcore(al.map->dso)) { in read_object_code() 192 if (state->done[d] == al.map->start) { in read_object_code() [all …]
|
D | vmlinux-kallsyms.c | 11 static int vmlinux_matches_kallsyms_filter(struct map *map __maybe_unused, in vmlinux_matches_kallsyms_filter() 26 struct map *kallsyms_map, *vmlinux_map; in test__vmlinux_matches_kallsyms() 188 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms() 208 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms() 233 struct map *pos = rb_entry(nd, struct map, rb_node); in test__vmlinux_matches_kallsyms()
|
D | hists_link.c | 17 struct map *map; member 98 fake_common_samples[k].map = al.map; in add_hist_entries() 122 fake_samples[i][k].map = al.map; in add_hist_entries() 136 struct thread *t, struct map *m, struct symbol *s) in find_sample() 139 if (samples->thread == t && samples->map == m && in find_sample() 170 he->thread, he->ms.map, he->ms.sym)) { in __validate_match() 222 he->thread, he->ms.map, he->ms.sym) && in __validate_link() 225 he->thread, he->ms.map, he->ms.sym)) { in __validate_link()
|
/tools/perf/ui/browsers/ |
D | map.c | 17 struct map *map; member 56 sym = map__find_symbol(browser->map, addr, NULL); in map_browser__search() 58 sym = map__find_symbol_by_name(browser->map, target, NULL); in map_browser__search() 75 if (ui_browser__show(&browser->b, browser->map->dso->long_name, in map_browser__run() 101 int map__browse(struct map *map) in map__browse() argument 105 .entries = &map->dso->symbols[map->type], in map__browse() 110 .map = map, in map__browse()
|
D | map.h | 3 struct map; 5 int map__browse(struct map *map);
|
/tools/testing/selftests/vm/ |
D | transhuge-stress.c | 64 uint8_t *map; in main() local 99 map = malloc(map_len); in main() 100 if (!map) in main() 106 memset(map, 0, map_len); in main() 121 map = realloc(map, idx + 1); in main() 122 if (!map) in main() 124 memset(map + map_len, 0, idx + 1 - map_len); in main() 127 if (!map[idx]) in main() 129 map[idx] = 1; in main()
|
D | thuge-gen.c | 141 char *map; in test_mmap() local 146 map = mmap(NULL, size*NUM_PAGES, PROT_READ|PROT_WRITE, in test_mmap() 149 if (map == (char *)-1) err("mmap"); in test_mmap() 150 memset(map, 0xff, size*NUM_PAGES); in test_mmap() 156 err = munmap(map, size); in test_mmap() 176 char *map = shmat(id, NULL, 0600); in test_shmget() local 177 if (map == (char*)-1) err("shmat"); in test_shmget() 181 memset(map, 0xff, size*NUM_PAGES); in test_shmget() 188 err = shmdt(map); in test_shmget()
|
/tools/perf/arch/x86/tests/ |
D | dwarf-unwind.c | 15 struct map *map; in sample_ustack() local 27 map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp); in sample_ustack() 28 if (!map) { in sample_ustack() 34 stack_size = map->end - sp; in sample_ustack()
|
/tools/perf/arch/arm/tests/ |
D | dwarf-unwind.c | 15 struct map *map; in sample_ustack() local 27 map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp); in sample_ustack() 28 if (!map) { in sample_ustack() 34 stack_size = map->end - sp; in sample_ustack()
|
/tools/perf/ui/gtk/ |
D | annotate.c | 52 struct map *map, struct disasm_line *dl) in perf_gtk__get_offset() argument 54 u64 start = map__rip_2objdump(map, sym->start); in perf_gtk__get_offset() 89 struct map *map, struct perf_evsel *evsel, in perf_gtk__annotate_symbol() argument 141 if (perf_gtk__get_offset(s, sizeof(s), sym, map, pos)) in perf_gtk__annotate_symbol() 157 static int symbol__gtk_annotate(struct symbol *sym, struct map *map, in symbol__gtk_annotate() argument 166 if (map->dso->annotate_warned) in symbol__gtk_annotate() 169 if (symbol__annotate(sym, map, 0) < 0) { in symbol__gtk_annotate() 225 perf_gtk__annotate_symbol(scrolled_window, sym, map, evsel, hbt); in symbol__gtk_annotate() 233 return symbol__gtk_annotate(he->ms.sym, he->ms.map, evsel, hbt); in hist_entry__gtk_annotate()
|