Home
last modified time | relevance | path

Searched refs:tok (Results 1 – 11 of 11) sorted by relevance

/tools/lib/traceevent/
Devent-parse.c920 static int extend_token(char **tok, char *buf, int size) in extend_token() argument
922 char *newtok = realloc(*tok, size); in extend_token()
925 free(*tok); in extend_token()
926 *tok = NULL; in extend_token()
930 if (!*tok) in extend_token()
934 *tok = newtok; in extend_token()
939 static enum event_type force_token(const char *str, char **tok);
941 static enum event_type __read_token(char **tok) in __read_token() argument
949 *tok = NULL; in __read_token()
965 if (asprintf(tok, "%c", ch) < 0) in __read_token()
[all …]
Dparse-filter.c73 static enum event_type read_token(char **tok) in read_token() argument
88 *tok = malloc(3); in read_token()
89 if (*tok == NULL) { in read_token()
93 sprintf(*tok, "%c%c", *token, '~'); in read_token()
99 *tok = token; in read_token()
Devent-parse.h784 enum event_type pevent_read_token(char **tok);
/tools/perf/util/
Dsort.c1591 int sort_dimension__add(const char *tok) in sort_dimension__add() argument
1598 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
1634 if (strncasecmp(tok, hd->name, strlen(tok))) in sort_dimension__add()
1643 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
1659 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
1722 char *tmp, *tok, *str; in __setup_sorting() local
1749 for (tok = strtok_r(str, ", ", &tmp); in __setup_sorting()
1750 tok; tok = strtok_r(NULL, ", ", &tmp)) { in __setup_sorting()
1751 ret = sort_dimension__add(tok); in __setup_sorting()
1753 error("Invalid --sort key: `%s'", tok); in __setup_sorting()
[all …]
Dcallchain.c85 char *tok; in __parse_callchain_report_opt() local
96 while ((tok = strtok((char *)arg, ",")) != NULL) { in __parse_callchain_report_opt()
97 if (!strncmp(tok, "none", strlen(tok))) { in __parse_callchain_report_opt()
103 if (!parse_callchain_mode(tok) || in __parse_callchain_report_opt()
104 !parse_callchain_order(tok) || in __parse_callchain_report_opt()
105 !parse_callchain_sort_key(tok)) { in __parse_callchain_report_opt()
110 if (parse_callchain_record(tok, &callchain_param)) in __parse_callchain_report_opt()
125 if (get_stack_size(tok, &size) < 0) in __parse_callchain_report_opt()
131 callchain_param.min_percent = strtod(tok, &endptr); in __parse_callchain_report_opt()
132 if (tok == endptr) in __parse_callchain_report_opt()
[all …]
Dutil.c479 char *tok, *name, *saveptr = NULL; in parse_callchain_record() local
490 tok = strtok_r((char *)buf, ",", &saveptr); in parse_callchain_record()
491 name = tok ? : (char *)buf; in parse_callchain_record()
513 tok = strtok_r(NULL, ",", &saveptr); in parse_callchain_record()
514 if (tok) { in parse_callchain_record()
517 ret = get_stack_size(tok, &size); in parse_callchain_record()
Dannotate.c58 char *endptr, *tok, *name; in call__parse() local
68 tok = strchr(name, '>'); in call__parse()
69 if (tok == NULL) in call__parse()
72 *tok = '\0'; in call__parse()
74 *tok = '>'; in call__parse()
79 tok = strchr(endptr, '('); in call__parse()
80 if (tok != NULL) { in call__parse()
85 tok = strchr(endptr, '*'); in call__parse()
86 if (tok == NULL) in call__parse()
89 ops->target.addr = strtoull(tok + 1, NULL, 16); in call__parse()
/tools/perf/bench/
Dnuma.c505 char *tok, *tok_end, *tok_step, *tok_len, *tok_mul; in parse_setup_cpu_list() local
510 tok = strsep(&str, ","); in parse_setup_cpu_list()
511 if (!tok) in parse_setup_cpu_list()
514 tok_end = strstr(tok, "-"); in parse_setup_cpu_list()
516 dprintf("\ntoken: {%s}, end: {%s}\n", tok, tok_end); in parse_setup_cpu_list()
519 bind_cpu_0 = bind_cpu_1 = atol(tok); in parse_setup_cpu_list()
522 bind_cpu_0 = atol(tok); in parse_setup_cpu_list()
527 tok_step = strstr(tok, "#"); in parse_setup_cpu_list()
539 tok_len = strstr(tok, "_"); in parse_setup_cpu_list()
547 tok_mul = strstr(tok, "x"); in parse_setup_cpu_list()
[all …]
/tools/perf/
Dbuiltin-kmem.c1623 static int slab_sort_dimension__add(const char *tok, struct list_head *list) in slab_sort_dimension__add() argument
1629 if (!strcmp(slab_sorts[i]->name, tok)) { in slab_sort_dimension__add()
1643 static int page_sort_dimension__add(const char *tok, struct list_head *list) in page_sort_dimension__add() argument
1649 if (!strcmp(page_sorts[i]->name, tok)) { in page_sort_dimension__add()
1665 char *tok; in setup_slab_sorting() local
1675 tok = strsep(&pos, ","); in setup_slab_sorting()
1676 if (!tok) in setup_slab_sorting()
1678 if (slab_sort_dimension__add(tok, sort_list) < 0) { in setup_slab_sorting()
1679 error("Unknown slab --sort key: '%s'", tok); in setup_slab_sorting()
1691 char *tok; in setup_page_sorting() local
[all …]
Dbuiltin-script.c1133 char *tok; in parse_output_fields() local
1147 tok = strchr(str, ':'); in parse_output_fields()
1148 if (tok) { in parse_output_fields()
1149 *tok = '\0'; in parse_output_fields()
1150 tok++; in parse_output_fields()
1174 tok = str; in parse_output_fields()
1192 for (tok = strtok(tok, ","); tok; tok = strtok(NULL, ",")) { in parse_output_fields()
1194 if (strcmp(tok, all_output_options[i].str) == 0) in parse_output_fields()
1197 if (i == imax && strcmp(tok, "flags") == 0) { in parse_output_fields()
Dbuiltin-sched.c1266 static int sort_dimension__add(const char *tok, struct list_head *list) in sort_dimension__add() argument
1298 if (!strcmp(available_sorts[i]->name, tok)) { in sort_dimension__add()
1727 char *tmp, *tok, *str = strdup(sched->sort_order); in setup_sorting() local
1729 for (tok = strtok_r(str, ", ", &tmp); in setup_sorting()
1730 tok; tok = strtok_r(NULL, ", ", &tmp)) { in setup_sorting()
1731 if (sort_dimension__add(tok, &sched->sort_list) < 0) { in setup_sorting()
1733 "Unknown --sort key: `%s'", tok); in setup_sorting()