Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 55) sorted by relevance

123

/tools/perf/util/
Dstrlist.h64 #define strlist__for_each(pos, slist) \ argument
65 for (pos = strlist__first(slist); pos; pos = strlist__next(pos))
74 #define strlist__for_each_safe(pos, n, slist) \ argument
75 for (pos = strlist__first(slist), n = strlist__next(pos); pos;\
76 pos = n, n = strlist__next(n))
Dintlist.h64 #define intlist__for_each(pos, ilist) \ argument
65 for (pos = intlist__first(ilist); pos; pos = intlist__next(pos))
74 #define intlist__for_each_safe(pos, n, ilist) \ argument
75 for (pos = intlist__first(ilist), n = intlist__next(pos); pos;\
76 pos = n, n = intlist__next(n))
Dstrbuf.c54 static void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, in strbuf_splice() argument
57 if (pos + len < pos) in strbuf_splice()
59 if (pos > sb->len) in strbuf_splice()
61 if (pos + len > sb->len) in strbuf_splice()
66 memmove(sb->buf + pos + dlen, in strbuf_splice()
67 sb->buf + pos + len, in strbuf_splice()
68 sb->len - pos - len); in strbuf_splice()
69 memcpy(sb->buf + pos, data, dlen); in strbuf_splice()
73 void strbuf_remove(struct strbuf *sb, size_t pos, size_t len) in strbuf_remove() argument
75 strbuf_splice(sb, pos, len, NULL, 0); in strbuf_remove()
Dmap.c432 struct map *pos = rb_entry(next, struct map, rb_node); in maps__delete() local
434 next = rb_next(&pos->rb_node); in maps__delete()
435 rb_erase(&pos->rb_node, maps); in maps__delete()
436 map__delete(pos); in maps__delete()
442 struct map *pos, *n; in maps__delete_removed() local
444 list_for_each_entry_safe(pos, n, maps, node) { in maps__delete_removed()
445 list_del(&pos->node); in maps__delete_removed()
446 map__delete(pos); in maps__delete_removed()
505 struct map *pos = rb_entry(next, struct map, rb_node); in map_groups__flush() local
506 next = rb_next(&pos->rb_node); in map_groups__flush()
[all …]
Dparse-options.c501 size_t pos; in print_option_help() local
513 pos = fprintf(stderr, " "); in print_option_help()
515 pos += fprintf(stderr, "-%c", opts->short_name); in print_option_help()
517 pos += fprintf(stderr, " "); in print_option_help()
520 pos += fprintf(stderr, ", "); in print_option_help()
522 pos += fprintf(stderr, "--%s", opts->long_name); in print_option_help()
533 pos += fprintf(stderr, "[=<n>]"); in print_option_help()
535 pos += fprintf(stderr, "[<n>]"); in print_option_help()
537 pos += fprintf(stderr, " <n>"); in print_option_help()
547 pos += fprintf(stderr, "[=<%s>]", opts->argh); in print_option_help()
[all …]
Ddso.c899 struct dso *pos; in __dsos__read_build_ids() local
901 list_for_each_entry(pos, head, node) { in __dsos__read_build_ids()
902 if (with_hits && !pos->hit) in __dsos__read_build_ids()
904 if (pos->has_build_id) { in __dsos__read_build_ids()
908 if (filename__read_build_id(pos->long_name, pos->build_id, in __dsos__read_build_ids()
909 sizeof(pos->build_id)) > 0) { in __dsos__read_build_ids()
911 pos->has_build_id = true; in __dsos__read_build_ids()
927 struct dso *pos; in dsos__find() local
930 list_for_each_entry(pos, &dsos->head, node) in dsos__find()
931 if (strcmp(pos->short_name, name) == 0) in dsos__find()
[all …]
Drblist.c107 struct rb_node *pos, *next = rb_first(&rblist->entries); in rblist__delete() local
110 pos = next; in rblist__delete()
111 next = rb_next(pos); in rblist__delete()
112 rblist__remove_node(rblist, pos); in rblist__delete()
Dsymbol.c284 struct symbol *pos; in symbols__delete() local
288 pos = rb_entry(next, struct symbol, rb_node); in symbols__delete()
289 next = rb_next(&pos->rb_node); in symbols__delete()
290 rb_erase(&pos->rb_node, symbols); in symbols__delete()
291 symbol__delete(pos); in symbols__delete()
388 struct symbol *pos = rb_entry(nd, struct symbol, rb_node); in symbols__sort_by_name() local
389 symbols__insert_by_name(symbols, pos); in symbols__sort_by_name()
455 struct symbol_name_rb_node *pos; in dso__fprintf_symbols_by_name() local
458 pos = rb_entry(nd, struct symbol_name_rb_node, rb_node); in dso__fprintf_symbols_by_name()
459 fprintf(fp, "%s\n", pos->sym.name); in dso__fprintf_symbols_by_name()
[all …]
Devlist.c96 struct perf_evsel *pos, *n; in perf_evlist__purge() local
98 evlist__for_each_safe(evlist, n, pos) { in perf_evlist__purge()
99 list_del_init(&pos->node); in perf_evlist__purge()
100 perf_evsel__delete(pos); in perf_evlist__purge()
285 struct perf_evsel *pos; in perf_evlist__disable() local
290 evlist__for_each(evlist, pos) { in perf_evlist__disable()
291 if (!perf_evsel__is_group_leader(pos) || !pos->fd) in perf_evlist__disable()
293 nr_threads = perf_evlist__nr_threads(evlist, pos); in perf_evlist__disable()
295 ioctl(FD(pos, cpu, thread), in perf_evlist__disable()
304 struct perf_evsel *pos; in perf_evlist__enable() local
[all …]
Dcallchain.h93 u64 pos; member
140 cursor->pos = 0; in callchain_cursor_commit()
147 if (cursor->pos == cursor->nr) in callchain_cursor_current()
156 cursor->pos++; in callchain_cursor_advance()
183 dest->nr -= src->pos; in callchain_cursor_snapshot()
Dtrace-event-info.c405 struct perf_evsel *pos; in get_tracepoints_path() local
408 list_for_each_entry(pos, pattrs, node) { in get_tracepoints_path()
409 if (pos->attr.type != PERF_TYPE_TRACEPOINT) in get_tracepoints_path()
413 if (pos->name) { in get_tracepoints_path()
414 ppath->next = tracepoint_name_to_path(pos->name); in get_tracepoints_path()
418 if (strchr(pos->name, ':') == NULL) in get_tracepoints_path()
425 ppath->next = tracepoint_id_to_path(pos->attr.config); in get_tracepoints_path()
441 struct perf_evsel *pos; in have_tracepoints() local
443 list_for_each_entry(pos, pattrs, node) in have_tracepoints()
444 if (pos->attr.type == PERF_TYPE_TRACEPOINT) in have_tracepoints()
/tools/usb/usbip/libsrc/
Dlist.h110 #define list_for_each(pos, head) \ argument
111 for (pos = (head)->next; pos != (head); pos = pos->next)
119 #define list_for_each_safe(pos, n, head) \ argument
120 for (pos = (head)->next, n = pos->next; pos != (head); \
121 pos = n, n = pos->next)
/tools/perf/ui/browsers/
Dheader.c99 char *ptr, *pos; in tui__header_window() local
107 for (pos = ptr, argc = 0; (pos = strchr(pos, '\n')) != NULL; pos++) in tui__header_window()
114 argv[0] = pos = ptr; in tui__header_window()
115 for (i = 1; (pos = strchr(pos, '\n')) != NULL; i++) { in tui__header_window()
116 *pos++ = '\0'; in tui__header_window()
117 argv[i] = pos; in tui__header_window()
Dannotate.c299 struct disasm_line *pos, u32 idx) in annotate_browser__set_top() argument
308 pos = list_entry(pos->node.prev, struct disasm_line, node); in annotate_browser__set_top()
310 if (disasm_line__filter(&browser->b, &pos->node)) in annotate_browser__set_top()
317 browser->b.top = pos; in annotate_browser__set_top()
325 struct disasm_line *pos; in annotate_browser__set_rb_top() local
329 pos = ((struct disasm_line *)bpos) - 1; in annotate_browser__set_rb_top()
333 annotate_browser__set_top(browser, pos, idx); in annotate_browser__set_rb_top()
343 struct disasm_line *pos, *next; in annotate_browser__calc_percent() local
350 list_for_each_entry(pos, &notes->src->source, node) { in annotate_browser__calc_percent()
351 struct browser_disasm_line *bpos = disasm_line__browser(pos); in annotate_browser__calc_percent()
[all …]
Dmap.c117 struct symbol *pos = rb_entry(nd, struct symbol, rb_node); in map__browse() local
119 if (maxaddr < pos->end) in map__browse()
120 maxaddr = pos->end; in map__browse()
122 u32 *idx = symbol__browser_index(pos); in map__browse()
/tools/perf/tests/
Dvmlinux-kallsyms.c188 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms() local
196 (pos->dso->kernel ? in test__vmlinux_matches_kallsyms()
197 pos->dso->short_name : in test__vmlinux_matches_kallsyms()
198 pos->dso->name)); in test__vmlinux_matches_kallsyms()
202 map__fprintf(pos, stderr); in test__vmlinux_matches_kallsyms()
208 struct map *pos = rb_entry(nd, struct map, rb_node), *pair; in test__vmlinux_matches_kallsyms() local
210 mem_start = vmlinux_map->unmap_ip(vmlinux_map, pos->start); in test__vmlinux_matches_kallsyms()
211 mem_end = vmlinux_map->unmap_ip(vmlinux_map, pos->end); in test__vmlinux_matches_kallsyms()
220 pos->start, pos->end, pos->pgoff, pos->dso->name); in test__vmlinux_matches_kallsyms()
233 struct map *pos = rb_entry(nd, struct map, rb_node); in test__vmlinux_matches_kallsyms() local
[all …]
/tools/power/cpupower/lib/
Dsysfs.c276 unsigned int pos, i; in sysfs_get_freq_available_governors() local
284 pos = 0; in sysfs_get_freq_available_governors()
287 if (i - pos < 2) in sysfs_get_freq_available_governors()
303 current->governor = malloc(i - pos + 1); in sysfs_get_freq_available_governors()
307 memcpy(current->governor, linebuf + pos, i - pos); in sysfs_get_freq_available_governors()
308 current->governor[i - pos] = '\0'; in sysfs_get_freq_available_governors()
309 pos = i + 1; in sysfs_get_freq_available_governors()
333 unsigned int pos, i; in sysfs_get_available_frequencies() local
341 pos = 0; in sysfs_get_available_frequencies()
344 if (i - pos < 2) in sysfs_get_available_frequencies()
[all …]
/tools/perf/util/include/linux/
Dlist.h27 #define list_for_each_from(pos, head) \ argument
28 for (; pos != (head); pos = pos->next)
/tools/perf/ui/
Dbrowser.c51 struct list_head *pos) in ui_browser__list_head_filter_entries() argument
54 if (!browser->filter || !browser->filter(browser, pos)) in ui_browser__list_head_filter_entries()
55 return pos; in ui_browser__list_head_filter_entries()
56 pos = pos->next; in ui_browser__list_head_filter_entries()
57 } while (pos != browser->entries); in ui_browser__list_head_filter_entries()
64 struct list_head *pos) in ui_browser__list_head_filter_prev_entries() argument
67 if (!browser->filter || !browser->filter(browser, pos)) in ui_browser__list_head_filter_prev_entries()
68 return pos; in ui_browser__list_head_filter_prev_entries()
69 pos = pos->prev; in ui_browser__list_head_filter_prev_entries()
70 } while (pos != browser->entries); in ui_browser__list_head_filter_prev_entries()
[all …]
/tools/firewire/
Dlist.h58 #define list_for_each_entry(pos, list, member) \ argument
59 for (pos = list_head(list, typeof(*pos), member); \
60 &pos->member != (list); \
61 pos = list_next(pos, member))
/tools/perf/
Dbuiltin-buildid-cache.c285 struct str_node *pos; in cmd_buildid_cache() local
343 strlist__for_each(pos, list) in cmd_buildid_cache()
344 if (build_id_cache__add_file(pos->s, debugdir)) { in cmd_buildid_cache()
347 pos->s); in cmd_buildid_cache()
351 pos->s, strerror_r(errno, sbuf, sizeof(sbuf))); in cmd_buildid_cache()
361 strlist__for_each(pos, list) in cmd_buildid_cache()
362 if (build_id_cache__remove_file(pos->s, debugdir)) { in cmd_buildid_cache()
365 pos->s); in cmd_buildid_cache()
369 pos->s, strerror_r(errno, sbuf, sizeof(sbuf))); in cmd_buildid_cache()
382 strlist__for_each(pos, list) in cmd_buildid_cache()
[all …]
Dbuiltin-evlist.c23 struct perf_evsel *pos; in __cmd_evlist() local
33 evlist__for_each(session->evlist, pos) in __cmd_evlist()
34 perf_evsel__fprintf(pos, details, stdout); in __cmd_evlist()
Dbuiltin-report.c292 struct perf_evsel *pos; in hists__fprintf_nr_sample_events() local
297 for_each_group_member(pos, evsel) { in hists__fprintf_nr_sample_events()
298 const struct hists *pos_hists = evsel__hists(pos); in hists__fprintf_nr_sample_events()
327 struct perf_evsel *pos; in perf_evlist__tty_browse_hists() local
329 evlist__for_each(evlist, pos) { in perf_evlist__tty_browse_hists()
330 struct hists *hists = evsel__hists(pos); in perf_evlist__tty_browse_hists()
331 const char *evname = perf_evsel__name(pos); in perf_evlist__tty_browse_hists()
334 !perf_evsel__is_group_leader(pos)) in perf_evlist__tty_browse_hists()
434 struct perf_evsel *pos; in report__collapse_hists() local
438 evlist__for_each(rep->session->evlist, pos) { in report__collapse_hists()
[all …]
/tools/perf/ui/gtk/
Dannotate.c92 struct disasm_line *pos, *n; in perf_gtk__annotate_symbol() local
120 list_for_each_entry(pos, &notes->src->source, node) { 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()
143 if (perf_gtk__get_line(s, sizeof(s), pos)) in perf_gtk__annotate_symbol()
149 list_for_each_entry_safe(pos, n, &notes->src->source, node) { in perf_gtk__annotate_symbol()
150 list_del(&pos->node); in perf_gtk__annotate_symbol()
151 disasm_line__free(pos); in perf_gtk__annotate_symbol()
/tools/lib/traceevent/
Dplugin_function.c59 static void add_child(struct func_stack *stack, const char *child, int pos) in add_child() argument
66 if (pos < stack->size) in add_child()
67 free(stack->stack[pos]); in add_child()
85 stack->stack[pos] = strdup(child); in add_child()

123