Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 60) sorted by relevance

123

/tools/perf/util/
Dmap.h27 struct map { struct
41 u64 (*map_ip)(struct map *, u64); argument
43 u64 (*unmap_ip)(struct map *, u64); argument
60 static inline struct kmap *map__kmap(struct map *map) in map__kmap() argument
62 return (struct kmap *)(map + 1); in map__kmap()
65 static inline u64 map__map_ip(struct map *map, u64 ip) in map__map_ip() argument
67 return ip - map->start + map->pgoff; in map__map_ip()
70 static inline u64 map__unmap_ip(struct map *map, u64 ip) in map__unmap_ip() argument
72 return ip + map->start - map->pgoff; in map__unmap_ip()
75 static inline u64 identity__map_ip(struct map *map __maybe_unused, u64 ip) in identity__map_ip()
[all …]
Dmap.c33 void map__init(struct map *map, enum map_type type, in map__init() argument
36 map->type = type; in map__init()
37 map->start = start; in map__init()
38 map->end = end; in map__init()
39 map->pgoff = pgoff; in map__init()
40 map->dso = dso; in map__init()
41 map->map_ip = map__map_ip; in map__init()
42 map->unmap_ip = map__unmap_ip; in map__init()
43 RB_CLEAR_NODE(&map->rb_node); in map__init()
44 map->groups = NULL; in map__init()
[all …]
Dcpumap.h9 int map[]; member
14 void cpu_map__delete(struct cpu_map *map);
16 size_t cpu_map__fprintf(struct cpu_map *map, FILE *fp);
17 int cpu_map__get_socket(struct cpu_map *map, int idx);
18 int cpu_map__get_core(struct cpu_map *map, int idx);
26 return sock->map[s]; in cpu_map__socket()
39 static inline int cpu_map__nr(const struct cpu_map *map) in cpu_map__nr() argument
41 return map ? map->nr : 1; in cpu_map__nr()
44 static inline bool cpu_map__all(const struct cpu_map *map) in cpu_map__all() argument
46 return map ? map->map[0] == -1 : true; in cpu_map__all()
Dcpumap.c22 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 …]
Dannotate.h135 int symbol__inc_addr_samples(struct symbol *sym, struct map *map,
140 int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize);
141 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym);
142 int symbol__annotate_printf(struct symbol *sym, struct map *map,
149 int symbol__tty_annotate(struct symbol *sym, struct map *map,
154 int symbol__tui_annotate(struct symbol *sym, struct map *map,
159 struct map *map __maybe_unused, in symbol__tui_annotate()
169 int symbol__gtk_annotate(struct symbol *sym, struct map *map,
177 return symbol__gtk_annotate(he->ms.sym, he->ms.map, evsel, hbt); in hist_entry__gtk_annotate()
Dsymbol.c27 static int dso__load_kernel_sym(struct dso *dso, struct map *map,
29 static int dso__load_guest_kernel_sym(struct dso *dso, struct map *map,
185 struct map *prev, *curr; in __map_groups__fixup_end()
191 curr = rb_entry(prevnd, struct map, rb_node); in __map_groups__fixup_end()
195 curr = rb_entry(nd, struct map, rb_node); in __map_groups__fixup_end()
475 struct map *map; member
492 struct rb_root *root = &a->dso->symbols[a->map->type]; in map__process_kallsym_symbol()
494 if (!symbol_type__is_a(type, a->map->type)) in map__process_kallsym_symbol()
520 struct map *map) in dso__load_all_kallsyms() argument
522 struct process_kallsyms_args args = { .map = map, .dso = dso, }; in dso__load_all_kallsyms()
[all …]
Dsymbol.h140 struct map *map; member
147 struct map *map; member
167 struct map *map; member
206 int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter);
207 int dso__load_vmlinux(struct dso *dso, struct map *map,
209 int dso__load_vmlinux_path(struct dso *dso, struct map *map,
211 int dso__load_kallsyms(struct dso *dso, const char *filename, struct map *map,
239 int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
243 struct map *map, symbol_filter_t filter);
Dsort.c110 static int64_t _sort__dso_cmp(struct map *map_l, struct map *map_r) in _sort__dso_cmp()
133 return _sort__dso_cmp(left->ms.map, right->ms.map); in sort__dso_cmp()
136 static int _hist_entry__dso_snprintf(struct map *map, char *bf, in _hist_entry__dso_snprintf() argument
139 if (map && map->dso) { in _hist_entry__dso_snprintf()
140 const char *dso_name = !verbose ? map->dso->short_name : in _hist_entry__dso_snprintf()
141 map->dso->long_name; in _hist_entry__dso_snprintf()
151 return _hist_entry__dso_snprintf(self->ms.map, bf, size, width); in hist_entry__dso_snprintf()
188 static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym, in _hist_entry__sym_snprintf() argument
195 char o = map ? dso__symtab_origin(map->dso) : '!'; in _hist_entry__sym_snprintf()
201 if (sym && map) { in _hist_entry__sym_snprintf()
[all …]
Dunwind.c270 static struct map *find_map(unw_word_t ip, struct unwind_info *ui) in find_map()
276 return al.map; in find_map()
284 struct map *map; in find_proc_info() local
288 map = find_map(ip, ui); in find_proc_info()
289 if (!map || !map->dso) in find_proc_info()
292 pr_debug("unwind: find_proc_info dso %s\n", map->dso->name); in find_proc_info()
294 if (read_unwind_spec(map->dso, ui->machine, in find_proc_info()
300 di.start_ip = map->start; in find_proc_info()
301 di.end_ip = map->end; in find_proc_info()
302 di.u.rti.segbase = map->start + segbase; in find_proc_info()
[all …]
Dmachine.c312 struct map *machine__new_module(struct machine *machine, u64 start, in machine__new_module()
315 struct map *map; in machine__new_module() local
321 map = map__new2(start, dso, MAP__FUNCTION); in machine__new_module()
322 if (map == NULL) in machine__new_module()
329 map_groups__insert(&machine->kmaps, map); in machine__new_module()
330 return map; in machine__new_module()
609 struct map *map = machine->vmlinux_maps[type]; in machine__load_kallsyms() local
610 int ret = dso__load_kallsyms(map->dso, filename, map, filter); in machine__load_kallsyms()
613 dso__set_loaded(map->dso, type); in machine__load_kallsyms()
628 struct map *map = machine->vmlinux_maps[type]; in machine__load_vmlinux_path() local
[all …]
Dhist.c85 if (h->ms.map) { in hists__calc_col_len()
86 len = dso__name_len(h->ms.map->dso); in hists__calc_col_len()
102 symlen = dso__name_len(h->branch_info->from.map->dso); in hists__calc_col_len()
114 symlen = dso__name_len(h->branch_info->to.map->dso); in hists__calc_col_len()
138 if (h->mem_info->daddr.map) { in hists__calc_col_len()
139 symlen = dso__name_len(h->mem_info->daddr.map->dso); in hists__calc_col_len()
291 if (he->ms.map) in hist_entry__new()
292 he->ms.map->referenced = true; in hist_entry__new()
295 if (he->branch_info->from.map) in hist_entry__new()
296 he->branch_info->from.map->referenced = true; in hist_entry__new()
[all …]
Devent.c269 struct map *pos = rb_entry(nd, struct map, rb_node); in perf_event__synthesize_modules()
330 threads->map[thread], 0, in perf_event__synthesize_thread_map()
340 if ((int) comm_event->comm.pid != threads->map[thread]) { in perf_event__synthesize_thread_map()
345 if ((int) comm_event->comm.pid == threads->map[j]) { in perf_event__synthesize_thread_map()
445 struct map *map; in perf_event__synthesize_kernel_mmap() local
484 map = machine->vmlinux_maps[MAP__FUNCTION]; in perf_event__synthesize_kernel_mmap()
492 event->mmap.start = map->start; in perf_event__synthesize_kernel_mmap()
493 event->mmap.len = map->end - event->mmap.start; in perf_event__synthesize_kernel_mmap()
605 al->map = NULL; in thread__find_addr_map()
626 al->map = NULL; in thread__find_addr_map()
[all …]
Dthread.c63 void thread__insert_map(struct thread *self, struct map *map) in thread__insert_map() argument
65 map_groups__fixup_overlappings(&self->mg, map, verbose, stderr); in thread__insert_map()
66 map_groups__insert(&self->mg, map); in thread__insert_map()
Dthread.h31 void thread__insert_map(struct thread *self, struct map *map);
35 static inline struct map *thread__find_map(struct thread *self, in thread__find_map()
Dsymbol-elf.c166 int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *map, in dso__synthesize_plt_symbols() argument
255 if (filter && filter(map, f)) in dso__synthesize_plt_symbols()
258 symbols__insert(&dso->symbols[map->type], f); in dso__synthesize_plt_symbols()
277 if (filter && filter(map, f)) in dso__synthesize_plt_symbols()
280 symbols__insert(&dso->symbols[map->type], f); in dso__synthesize_plt_symbols()
627 int dso__load_sym(struct dso *dso, struct map *map, in dso__load_sym() argument
631 struct kmap *kmap = dso->kernel ? map__kmap(map) : NULL; in dso__load_sym()
632 struct map *curr_map = map; in dso__load_sym()
697 if (!is_label && !elf_sym__is_a(&sym, map->type)) in dso__load_sym()
736 if (is_label && !elf_sec__is_a(&shdr, secstrs, map->type)) in dso__load_sym()
[all …]
Dprobe-event.c109 struct map **mapp) in __find_kernel_function_by_name()
115 static struct map *kernel_get_module_map(const char *module) in kernel_get_module_map()
128 struct map *pos = rb_entry(nd, struct map, rb_node); in kernel_get_module_map()
140 struct map *map; in kernel_get_module_dso() local
153 map = machine.vmlinux_maps[MAP__FUNCTION]; in kernel_get_module_dso()
154 dso = map->dso; in kernel_get_module_dso()
158 if (dso__load_vmlinux(dso, map, vmlinux_name, NULL) <= 0) in kernel_get_module_dso()
161 if (dso__load_vmlinux_path(dso, map, NULL) <= 0) { in kernel_get_module_dso()
233 struct map *map; in kprobe_convert_to_perf_probe() local
238 sym = __find_kernel_function_by_name(tp->symbol, &map); in kprobe_convert_to_perf_probe()
[all …]
Dmachine.h30 struct map *vmlinux_maps[MAP__NR_TYPES];
34 struct map *machine__kernel_map(struct machine *machine, enum map_type type) in machine__kernel_map()
109 struct map **mapp, in machine__find_kernel_symbol()
118 struct map **mapp, in machine__find_kernel_function()
128 struct map **mapp, in machine__find_kernel_function_by_name()
135 struct map *machine__new_module(struct machine *machine, u64 start,
Dannotate.c423 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym) in symbol__annotate_init()
467 int symbol__inc_addr_samples(struct symbol *sym, struct map *map, in symbol__inc_addr_samples() argument
478 pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr)); in symbol__inc_addr_samples()
763 static int symbol__parse_objdump_line(struct symbol *sym, struct map *map, in symbol__parse_objdump_line() argument
808 u64 start = map__rip_2objdump(map, sym->start), in symbol__parse_objdump_line()
809 end = map__rip_2objdump(map, sym->end); in symbol__parse_objdump_line()
829 int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize) in symbol__annotate() argument
831 struct dso *dso = map->dso; in symbol__annotate()
892 filename, sym->name, map->unmap_ip(map, sym->start), in symbol__annotate()
893 map->unmap_ip(map, sym->end)); in symbol__annotate()
[all …]
/tools/perf/tests/
Dopen-syscall-all-cpus.c50 if (cpus->map[cpu] >= CPU_SETSIZE) { in test__open_syscall_event_on_all_cpus()
51 pr_debug("Ignoring CPU %d\n", cpus->map[cpu]); in test__open_syscall_event_on_all_cpus()
55 CPU_SET(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus()
58 cpus->map[cpu], in test__open_syscall_event_on_all_cpus()
66 CPU_CLR(cpus->map[cpu], &cpu_set); in test__open_syscall_event_on_all_cpus()
84 if (cpus->map[cpu] >= CPU_SETSIZE) in test__open_syscall_event_on_all_cpus()
96 expected, cpus->map[cpu], evsel->counts->cpu[cpu].val); in test__open_syscall_event_on_all_cpus()
Dvmlinux-kallsyms.c11 static int vmlinux_matches_kallsyms_filter(struct map *map __maybe_unused, in vmlinux_matches_kallsyms_filter()
24 struct map *kallsyms_map, *vmlinux_map; in test__vmlinux_matches_kallsyms()
182 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms()
202 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms()
224 struct map *pos = rb_entry(nd, struct map, rb_node); in test__vmlinux_matches_kallsyms()
Dhists_link.c153 struct map *map; member
231 fake_common_samples[k].map = al.map; in add_hist_entries()
255 fake_samples[i][k].map = al.map; in add_hist_entries()
269 struct thread *t, struct map *m, struct symbol *s) in find_sample()
272 if (samples->thread == t && samples->map == m && in find_sample()
303 he->thread, he->ms.map, he->ms.sym)) { in __validate_match()
355 he->thread, he->ms.map, he->ms.sym) && in __validate_link()
358 he->thread, he->ms.map, he->ms.sym)) { in __validate_link()
425 i, he->thread->comm, he->ms.map->dso->short_name, in print_hists()
/tools/perf/ui/browsers/
Dmap.c17 struct map *map; member
56 sym = map__find_symbol(self->map, addr, NULL); in map_browser__search()
58 sym = map__find_symbol_by_name(self->map, target, NULL); in map_browser__search()
75 if (ui_browser__show(&self->b, self->map->dso->long_name, in map_browser__run()
101 int map__browse(struct map *self) in map__browse()
110 .map = self, in map__browse()
Dmap.h3 struct map;
5 int map__browse(struct map *self);
/tools/perf/ui/gtk/
Dannotate.c52 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 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()
/tools/testing/selftests/vm/
Dthuge-gen.c141 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()

123