Home
last modified time | relevance | path

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

123

/tools/virtio/linux/
Dexport.h1 #define EXPORT_SYMBOL_GPL(sym) extern typeof(sym) sym argument
2 #define EXPORT_SYMBOL(sym) extern typeof(sym) sym argument
/tools/perf/arch/powerpc/util/
Dsym-handling.c23 void arch__elf_sym_adjust(GElf_Sym *sym) in arch__elf_sym_adjust() argument
25 sym->st_value += PPC64_LOCAL_ENTRY_OFFSET(sym->st_other); in arch__elf_sym_adjust()
33 char *sym = syma->name; in arch__choose_best_symbol() local
37 if (*sym == '.') in arch__choose_best_symbol()
38 sym++; in arch__choose_best_symbol()
42 if (strlen(sym) >= 3 && !strncmp(sym, "SyS", 3)) in arch__choose_best_symbol()
44 if (strlen(sym) >= 10 && !strncmp(sym, "compat_SyS", 10)) in arch__choose_best_symbol()
/tools/include/linux/
Dexport.h4 #define EXPORT_SYMBOL(sym) argument
5 #define EXPORT_SYMBOL_GPL(sym) argument
6 #define EXPORT_SYMBOL_GPL_FUTURE(sym) argument
7 #define EXPORT_UNUSED_SYMBOL(sym) argument
8 #define EXPORT_UNUSED_SYMBOL_GPL(sym) argument
/tools/perf/ui/browsers/
Dmap.c22 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map_browser__write() local
29 mb->addrlen, sym->start, mb->addrlen, sym->end, in map_browser__write()
30 sym->binding == STB_GLOBAL ? 'g' : in map_browser__write()
31 sym->binding == STB_LOCAL ? 'l' : 'w'); in map_browser__write()
34 ui_browser__write_nstring(browser, sym->name, width); in map_browser__write()
46 struct symbol *sym; in map_browser__search() local
55 sym = map__find_symbol(browser->map, addr, NULL); in map_browser__search()
57 sym = map__find_symbol_by_name(browser->map, target, NULL); in map_browser__search()
59 if (sym != NULL) { in map_browser__search()
60 u32 *idx = symbol__browser_index(sym); in map_browser__search()
[all …]
Dannotate.c245 static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sym) in disasm_line__is_valid_jump() argument
249 || dl->ops.target.offset >= symbol__size(sym)) in disasm_line__is_valid_jump()
262 struct symbol *sym = ms->sym; in annotate_browser__draw_current_jump() local
266 if (strstr(sym->name, "@plt")) in annotate_browser__draw_current_jump()
269 if (!disasm_line__is_valid_jump(cursor, sym)) in annotate_browser__draw_current_jump()
382 struct symbol *sym = ms->sym; in annotate_browser__calc_percent() local
383 struct annotation *notes = symbol__annotation(sym); in annotate_browser__calc_percent()
385 s64 len = symbol__size(sym); in annotate_browser__calc_percent()
477 static int sym_title(struct symbol *sym, struct map *map, char *title, in sym_title() argument
480 return snprintf(title, sz, "%s %s", sym->name, map->dso->long_name); in sym_title()
[all …]
/tools/perf/util/
Dannotate.c443 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym) in symbol__annotate_init() argument
445 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_init()
450 int symbol__alloc_hist(struct symbol *sym) in symbol__alloc_hist() argument
452 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist()
453 const size_t size = symbol__size(sym); in symbol__alloc_hist()
477 static int symbol__alloc_hist_cycles(struct symbol *sym) in symbol__alloc_hist_cycles() argument
479 struct annotation *notes = symbol__annotation(sym); in symbol__alloc_hist_cycles()
480 const size_t size = symbol__size(sym); in symbol__alloc_hist_cycles()
488 void symbol__annotate_zero_histograms(struct symbol *sym) in symbol__annotate_zero_histograms() argument
490 struct annotation *notes = symbol__annotation(sym); in symbol__annotate_zero_histograms()
[all …]
Dparse-events.l86 static int sym(yyscan_t scanner, int type, int config) in sym() function
221 cpu-cycles|cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); }
222 stalled-cycles-frontend|idle-cycles-frontend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT…
223 stalled-cycles-backend|idle-cycles-backend { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_H…
224 instructions { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); }
225 cache-references { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); }
226 cache-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); }
227 branch-instructions|branches { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_INS…
228 branch-misses { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_MISSES); }
229 bus-cycles { return sym(yyscanner, PERF_TYPE_HARDWARE, PERF_COUNT_HW_BUS_CYCLES); }
[all …]
Dannotate.h141 static inline struct annotation *symbol__annotation(struct symbol *sym) in symbol__annotation() argument
143 return (void *)sym - symbol_conf.priv_size; in symbol__annotation()
154 int symbol__alloc_hist(struct symbol *sym);
155 void symbol__annotate_zero_histograms(struct symbol *sym);
157 int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize);
161 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym);
162 int symbol__annotate_printf(struct symbol *sym, struct map *map,
165 void symbol__annotate_zero_histogram(struct symbol *sym, int evidx);
166 void symbol__annotate_decay_histogram(struct symbol *sym, int evidx);
171 int symbol__tty_annotate(struct symbol *sym, struct map *map,
[all …]
Dsymbol.h61 void symbol__delete(struct symbol *sym);
75 static inline size_t symbol__size(const struct symbol *sym) in symbol__size() argument
77 return sym->end - sym->start; in symbol__size()
150 static inline void *symbol__priv(struct symbol *sym) in symbol__priv() argument
152 return ((void *)sym) - symbol_conf.priv_size; in symbol__priv()
163 struct symbol *sym; member
168 struct symbol *sym; member
189 struct symbol *sym; member
242 struct symbol *symbol__next_by_name(struct symbol *sym);
245 struct symbol *dso__next_symbol(struct symbol *sym);
[all …]
Dthread-stack.c339 struct symbol *sym, u64 ip, bool in_kernel) in call_path__init() argument
342 cp->sym = sym; in call_path__init()
343 cp->ip = sym ? 0 : ip; in call_path__init()
375 struct symbol *sym, u64 ip, in call_path__new() argument
396 call_path__init(cp, parent, sym, ip, in_kernel); in call_path__new()
403 struct symbol *sym, u64 ip, u64 ks) in call_path__findnew() argument
410 if (sym) in call_path__findnew()
414 return call_path__new(cpr, parent, sym, ip, in_kernel); in call_path__findnew()
421 if (cp->sym == sym && cp->ip == ip) in call_path__findnew()
424 if (sym < cp->sym || (sym == cp->sym && ip < cp->ip)) in call_path__findnew()
[all …]
Dsymbol.c236 struct symbol *sym = calloc(1, (symbol_conf.priv_size + in symbol__new() local
237 sizeof(*sym) + namelen)); in symbol__new()
238 if (sym == NULL) in symbol__new()
242 sym = ((void *)sym) + symbol_conf.priv_size; in symbol__new()
244 sym->start = start; in symbol__new()
245 sym->end = len ? start + len : start; in symbol__new()
246 sym->binding = binding; in symbol__new()
247 sym->namelen = namelen - 1; in symbol__new()
250 __func__, name, start, sym->end); in symbol__new()
251 memcpy(sym->name, name, namelen); in symbol__new()
[all …]
Dsymbol-elf.c67 #define elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) \ argument
68 for (idx = 0, gelf_getsym(syms, idx, &sym);\
70 idx++, gelf_getsym(syms, idx, &sym))
72 static inline uint8_t elf_sym__type(const GElf_Sym *sym) in elf_sym__type() argument
74 return GELF_ST_TYPE(sym->st_info); in elf_sym__type()
77 static inline uint8_t elf_sym__visibility(const GElf_Sym *sym) in elf_sym__visibility() argument
79 return GELF_ST_VISIBILITY(sym->st_other); in elf_sym__visibility()
86 static inline int elf_sym__is_function(const GElf_Sym *sym) in elf_sym__is_function() argument
88 return (elf_sym__type(sym) == STT_FUNC || in elf_sym__is_function()
89 elf_sym__type(sym) == STT_GNU_IFUNC) && in elf_sym__is_function()
[all …]
Ddb-export.c218 int db_export__symbol(struct db_export *dbe, struct symbol *sym, in db_export__symbol() argument
221 u64 *sym_db_id = symbol__priv(sym); in db_export__symbol()
229 return dbe->export_symbol(dbe, sym, dso); in db_export__symbol()
258 if (!al->sym) { in db_ids_from_al()
259 al->sym = symbol__new(al->addr, 0, 0, "unknown"); in db_ids_from_al()
260 if (al->sym) in db_ids_from_al()
262 al->sym); in db_ids_from_al()
265 if (al->sym) { in db_ids_from_al()
266 u64 *db_id = symbol__priv(al->sym); in db_ids_from_al()
268 err = db_export__symbol(dbe, al->sym, dso); in db_ids_from_al()
[all …]
Dcallchain.c413 call->ms.sym = cursor_node->sym; in fill_node()
440 struct symbol *sym = node->sym; in match_chain() local
442 if (cnode->ms.sym && sym && in match_chain()
444 return cnode->ms.sym->start - sym->start; in match_chain()
650 list->ms.map, list->ms.sym); in merge_chain_branch()
686 u64 ip, struct map *map, struct symbol *sym) in callchain_cursor_append() argument
700 node->sym = sym; in callchain_cursor_append()
735 al->sym = node->sym; in fill_callchain_info()
741 if (al->sym == NULL) { in fill_callchain_info()
778 if (cl->ms.sym) { in callchain_list__sym_name()
[all …]
Dsort.c203 if (!left->ms.sym && !right->ms.sym) in sort__sym_cmp()
216 return _sort__sym_cmp(left->ms.sym, right->ms.sym); in sort__sym_cmp()
222 if (!left->ms.sym || !right->ms.sym) in sort__sym_sort()
223 return cmp_null(left->ms.sym, right->ms.sym); in sort__sym_sort()
225 return strcmp(right->ms.sym->name, left->ms.sym->name); in sort__sym_sort()
228 static int _hist_entry__sym_snprintf(struct map *map, struct symbol *sym, in _hist_entry__sym_snprintf() argument
241 if (sym && map) { in _hist_entry__sym_snprintf()
243 ret += repsep_snprintf(bf + ret, size - ret, "%s", sym->name); in _hist_entry__sym_snprintf()
245 ip - map->unmap_ip(map, sym->start)); in _hist_entry__sym_snprintf()
251 sym->name); in _hist_entry__sym_snprintf()
[all …]
Dsrcline.c284 char *__get_srcline(struct dso *dso, u64 addr, struct symbol *sym, in __get_srcline() argument
326 if (sym) { in __get_srcline()
327 if (asprintf(&srcline, "%s+%" PRIu64, show_sym ? sym->name : "", in __get_srcline()
328 addr - sym->start) < 0) in __get_srcline()
341 char *get_srcline(struct dso *dso, u64 addr, struct symbol *sym, in get_srcline() argument
344 return __get_srcline(dso, addr, sym, show_sym, false); in get_srcline()
Dmap.c264 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map__fixup_start() local
265 map->start = sym->start; in map__fixup_start()
274 struct symbol *sym = rb_entry(nd, struct symbol, rb_node); in map__fixup_end() local
275 map->end = sym->end; in map__fixup_end()
559 struct symbol *sym; in maps__find_symbol_by_name() local
567 sym = map__find_symbol_by_name(pos, name, filter); in maps__find_symbol_by_name()
569 if (sym == NULL) in maps__find_symbol_by_name()
576 sym = NULL; in maps__find_symbol_by_name()
579 return sym; in maps__find_symbol_by_name()
588 struct symbol *sym = maps__find_symbol_by_name(&mg->maps[type], name, mapp, filter); in map_groups__find_symbol_by_name() local
[all …]
/tools/perf/tests/
Dvmlinux-kallsyms.c12 struct symbol *sym) in vmlinux_matches_kallsyms_filter() argument
14 bool *visited = symbol__priv(sym); in vmlinux_matches_kallsyms_filter()
25 struct symbol *sym; in test__vmlinux_matches_kallsyms() local
115 sym = rb_entry(nd, struct symbol, rb_node); in test__vmlinux_matches_kallsyms()
117 if (sym->start == sym->end) in test__vmlinux_matches_kallsyms()
120 mem_start = vmlinux_map->unmap_ip(vmlinux_map, sym->start); in test__vmlinux_matches_kallsyms()
121 mem_end = vmlinux_map->unmap_ip(vmlinux_map, sym->end); in test__vmlinux_matches_kallsyms()
129 if (arch__compare_symbol_names(sym->name, pair->name) == 0) { in test__vmlinux_matches_kallsyms()
142 mem_start, sym->name, mem_end, in test__vmlinux_matches_kallsyms()
174 mem_start, sym->name, pair->name); in test__vmlinux_matches_kallsyms()
[all …]
Dhists_link.c18 struct symbol *sym; member
101 fake_common_samples[k].sym = al.sym; in add_hist_entries()
127 fake_samples[i][k].sym = al.sym; in add_hist_entries()
144 samples->sym == s) in find_sample()
174 he->thread, he->ms.map, he->ms.sym)) { in __validate_match()
226 he->thread, he->ms.map, he->ms.sym) && in __validate_link()
229 he->thread, he->ms.map, he->ms.sym)) { in __validate_link()
Dhists_common.c132 struct symbol *sym; in setup_fake_machine() local
135 sym = symbol__new(fsym->start, fsym->length, in setup_fake_machine()
137 if (sym == NULL) { in setup_fake_machine()
142 symbols__insert(&dso->symbols[MAP__FUNCTION], sym); in setup_fake_machine()
179 he->ms.sym->name, he->stat.period); in print_hists_in()
206 he->ms.sym->name, he->stat.period, in print_hists_out()
Dhists_cumulate.c18 struct symbol *sym; member
117 fake_samples[i].sym = al.sym; in add_hist_entries()
155 #define SYM(he) (he->ms.sym->name)
160 #define CSYM(cl) (cl->ms.sym->name)
167 const char *sym; member
174 const char *sym; member
214 !strcmp(SYM(he), expected[i].sym)); in do_test()
234 !strcmp(CSYM(clist), expected_callchain[i].node[c].sym)); in do_test()
/tools/perf/ui/gtk/
Dannotate.c22 static int perf_gtk__get_percent(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_percent() argument
35 symhist = annotation__histogram(symbol__annotation(sym), evidx); in perf_gtk__get_percent()
51 static int perf_gtk__get_offset(char *buf, size_t size, struct symbol *sym, in perf_gtk__get_offset() argument
54 u64 start = map__rip_2objdump(map, sym->start); in perf_gtk__get_offset()
88 static int perf_gtk__annotate_symbol(GtkWidget *window, struct symbol *sym, in perf_gtk__annotate_symbol() argument
101 notes = symbol__annotation(sym); in perf_gtk__annotate_symbol()
130 sym, pos, in perf_gtk__annotate_symbol()
135 ret = perf_gtk__get_percent(s, sizeof(s), sym, pos, in perf_gtk__annotate_symbol()
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
[all …]
/tools/perf/
Dbuiltin-top.c96 struct symbol *sym; in perf_top__parse_source() local
101 if (!he || !he->ms.sym) in perf_top__parse_source()
104 sym = he->ms.sym; in perf_top__parse_source()
113 "path\n", sym->name); in perf_top__parse_source()
118 notes = symbol__annotation(sym); in perf_top__parse_source()
126 if (symbol__alloc_hist(sym) < 0) { in perf_top__parse_source()
129 sym->name); in perf_top__parse_source()
134 err = symbol__annotate(sym, map, 0); in perf_top__parse_source()
146 struct symbol *sym = he->ms.sym; in __zero_source_counters() local
147 symbol__annotate_zero_histograms(sym); in __zero_source_counters()
[all …]
Dbuiltin-annotate.c59 (al->sym == NULL || in perf_evsel__add_sample()
60 strcmp(ann->sym_hist_filter, al->sym->name) != 0)) { in perf_evsel__add_sample()
66 if (al->sym != NULL) { in perf_evsel__add_sample()
67 rb_erase(&al->sym->rb_node, in perf_evsel__add_sample()
69 symbol__delete(al->sym); in perf_evsel__add_sample()
117 return symbol__tty_annotate(he->ms.sym, he->ms.map, evsel, in hist_entry__tty_annotate()
132 if (he->ms.sym == NULL || he->ms.map->dso->annotate_warned) in hists__find_annotations()
135 notes = symbol__annotation(he->ms.sym); in hists__find_annotations()
/tools/perf/scripts/python/
Dnet_dropmonitor.py54 (sym, off) = get_sym(i)
55 if sym == None:
56 sym = i
57 print "%25s %25s %25s" % (sym, off, drop_log[i])

123