/tools/perf/arch/s390/annotate/ |
D | instructions.c | 7 char *endptr, *tok, *name; in s390_call__parse() local 13 tok = strchr(ops->raw, ','); in s390_call__parse() 14 if (!tok) in s390_call__parse() 17 ops->target.addr = strtoull(tok + 1, &endptr, 16); in s390_call__parse() 29 tok = strchr(name, '>'); in s390_call__parse() 30 if (tok == NULL) in s390_call__parse() 33 *tok = '\0'; in s390_call__parse() 35 *tok = '>'; in s390_call__parse()
|
/tools/perf/pmu-events/ |
D | jsmn.c | 34 jsmntok_t *tok; in jsmn_alloc_token() local 38 tok = &tokens[parser->toknext++]; in jsmn_alloc_token() 39 tok->start = tok->end = -1; in jsmn_alloc_token() 40 tok->size = 0; in jsmn_alloc_token() 41 return tok; in jsmn_alloc_token()
|
D | jevents.c | 533 jsmntok_t *tokens, *tok; in json_events() local 545 tok = tokens + 1; in json_events() 556 jsmntok_t *obj = tok++; in json_events() 564 field = tok + j; in json_events() 565 EXPECT(field->type == JSMN_STRING, tok + j, in json_events() 567 val = tok + j + 1; in json_events() 568 EXPECT(val->type == JSMN_STRING, tok + j + 1, in json_events() 702 tok += j; in json_events() 704 EXPECT(tok - tokens == len, tok, "unexpected objects at end"); in json_events()
|
/tools/lib/traceevent/ |
D | event-parse.c | 972 static int extend_token(char **tok, char *buf, int size) in extend_token() argument 974 char *newtok = realloc(*tok, size); in extend_token() 977 free(*tok); in extend_token() 978 *tok = NULL; in extend_token() 982 if (!*tok) in extend_token() 986 *tok = newtok; in extend_token() 991 static enum tep_event_type force_token(const char *str, char **tok); 993 static enum tep_event_type __read_token(char **tok) in __read_token() argument 1001 *tok = NULL; in __read_token() 1017 if (asprintf(tok, "%c", ch) < 0) in __read_token() [all …]
|
D | event-parse-local.h | 120 enum tep_event_type read_token(char **tok); 121 void free_token(char *tok);
|
D | parse-filter.c | 60 static enum tep_event_type filter_read_token(char **tok) in filter_read_token() argument 75 *tok = malloc(3); in filter_read_token() 76 if (*tok == NULL) { in filter_read_token() 80 sprintf(*tok, "%c%c", *token, '~'); in filter_read_token() 86 *tok = token; in filter_read_token()
|
/tools/perf/util/ |
D | callchain.c | 170 char *tok; in __parse_callchain_report_opt() local 182 while ((tok = strtok_r((char *)arg, ",", &saveptr)) != NULL) { in __parse_callchain_report_opt() 183 if (!strncmp(tok, "none", strlen(tok))) { in __parse_callchain_report_opt() 190 if (!parse_callchain_mode(tok) || in __parse_callchain_report_opt() 191 !parse_callchain_order(tok) || in __parse_callchain_report_opt() 192 !parse_callchain_sort_key(tok) || in __parse_callchain_report_opt() 193 !parse_callchain_value(tok)) { in __parse_callchain_report_opt() 198 if (parse_callchain_record(tok, &callchain_param)) in __parse_callchain_report_opt() 213 if (get_stack_size(tok, &size) < 0) in __parse_callchain_report_opt() 219 callchain_param.min_percent = strtod(tok, &endptr); in __parse_callchain_report_opt() [all …]
|
D | sort.c | 2457 static int add_dynamic_entry(struct evlist *evlist, const char *tok, in add_dynamic_entry() argument 2469 str = strdup(tok); in add_dynamic_entry() 2600 int sort_dimension__add(struct perf_hpp_list *list, const char *tok, in sort_dimension__add() argument 2609 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 2649 if (strncasecmp(tok, hd->name, strlen(tok))) in sort_dimension__add() 2658 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 2674 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add() 2690 if (!add_dynamic_entry(evlist, tok, level)) in sort_dimension__add() 2699 char *tmp, *tok; in setup_sort_list() local 2706 tok = str; in setup_sort_list() [all …]
|
D | mem-events.c | 48 char *tok, *saveptr = NULL; in perf_mem_events__parse() local 60 tok = strtok_r((char *)buf, ",", &saveptr); in perf_mem_events__parse() 62 while (tok) { in perf_mem_events__parse() 66 if (strstr(e->tag, tok)) in perf_mem_events__parse() 70 tok = strtok_r(NULL, ",", &saveptr); in perf_mem_events__parse()
|
D | sort.h | 304 int sort_dimension__add(struct perf_hpp_list *list, const char *tok, 307 int output_field_add(struct perf_hpp_list *list, char *tok);
|
D | pmu.c | 706 char *tmp = NULL, *tok, *str; in pmu_uncore_alias_match() local 716 tok = strtok_r(str, ",", &tmp); in pmu_uncore_alias_match() 717 if (strncmp(pmu_name, tok, strlen(tok))) { in pmu_uncore_alias_match() 730 for (; tok; name += strlen(tok), tok = strtok_r(NULL, ",", &tmp)) { in pmu_uncore_alias_match() 731 name = strstr(name, tok); in pmu_uncore_alias_match()
|
D | annotate.c | 242 char *endptr, *tok, *name; in call__parse() local 260 tok = strchr(name, '>'); in call__parse() 261 if (tok == NULL) in call__parse() 264 *tok = '\0'; in call__parse() 266 *tok = '>'; in call__parse() 280 tok = strchr(endptr, '*'); in call__parse() 281 if (tok != NULL) { in call__parse()
|
/tools/perf/bench/ |
D | numa.c | 529 char *tok, *tok_end, *tok_step, *tok_len, *tok_mul; in parse_setup_cpu_list() local 534 tok = strsep(&str, ","); in parse_setup_cpu_list() 535 if (!tok) in parse_setup_cpu_list() 538 tok_end = strstr(tok, "-"); in parse_setup_cpu_list() 540 dprintf("\ntoken: {%s}, end: {%s}\n", tok, tok_end); in parse_setup_cpu_list() 543 bind_cpu_0 = bind_cpu_1 = atol(tok); in parse_setup_cpu_list() 546 bind_cpu_0 = atol(tok); in parse_setup_cpu_list() 551 tok_step = strstr(tok, "#"); in parse_setup_cpu_list() 563 tok_len = strstr(tok, "_"); in parse_setup_cpu_list() 571 tok_mul = strstr(tok, "x"); in parse_setup_cpu_list() [all …]
|
/tools/testing/selftests/net/ |
D | so_txtime.c | 298 char *arg, *tok; in parse_io() local 305 while ((tok = strtok(arg, ","))) { in parse_io() 312 array->delay_us = strtol(tok, NULL, 0) * 1000; in parse_io() 315 array->data = tok[0]; in parse_io()
|
/tools/perf/ |
D | builtin-kmem.c | 1662 static int slab_sort_dimension__add(const char *tok, struct list_head *list) in slab_sort_dimension__add() argument 1668 if (!strcmp(slab_sorts[i]->name, tok)) { in slab_sort_dimension__add() 1682 static int page_sort_dimension__add(const char *tok, struct list_head *list) in page_sort_dimension__add() argument 1688 if (!strcmp(page_sorts[i]->name, tok)) { in page_sort_dimension__add() 1704 char *tok; in setup_slab_sorting() local 1714 tok = strsep(&pos, ","); in setup_slab_sorting() 1715 if (!tok) in setup_slab_sorting() 1717 if (slab_sort_dimension__add(tok, sort_list) < 0) { in setup_slab_sorting() 1718 pr_err("Unknown slab --sort key: '%s'", tok); in setup_slab_sorting() 1730 char *tok; in setup_page_sorting() local [all …]
|
D | builtin-c2c.c | 1771 char *tmp, *tok; \ 1777 for (tok = strtok_r((char *)_list, ", ", &tmp); \ 1778 tok; tok = strtok_r(NULL, ", ", &tmp)) { \ 1779 ret = _fn(hpp_list, tok); \ 1781 pr_err("Invalid --fields key: `%s'", tok); \ 1784 pr_err("Unknown --fields key: `%s'", tok); \ 2594 char *tok, *tmp, *buf = strdup(cl_sort); in build_cl_output() local 2606 for_each_token(tok, buf, ",", tmp) { in build_cl_output() 2607 if (!strcmp(tok, "tid")) { in build_cl_output() 2609 } else if (!strcmp(tok, "pid")) { in build_cl_output() [all …]
|
D | builtin-script.c | 2670 char *tok, *strtok_saveptr = NULL; in parse_output_fields() local 2685 tok = strchr(str, ':'); in parse_output_fields() 2686 if (tok) { in parse_output_fields() 2687 *tok = '\0'; in parse_output_fields() 2688 tok++; in parse_output_fields() 2712 if (strchr(tok, '+') || strchr(tok, '-')) in parse_output_fields() 2720 tok = str; in parse_output_fields() 2743 for (tok = strtok_r(tok, ",", &strtok_saveptr); tok; tok = strtok_r(NULL, ",", &strtok_saveptr)) { in parse_output_fields() 2744 if (*tok == '+') { in parse_output_fields() 2748 tok++; in parse_output_fields() [all …]
|
D | builtin-trace.c | 595 char *tok = bf, *sep, *end; in strarray__strtoul_flags() local 602 sep = memchr(tok, '|', size); in strarray__strtoul_flags() 604 size -= sep - tok + 1; in strarray__strtoul_flags() 607 while (end > tok && isspace(*end)) in strarray__strtoul_flags() 610 toklen = end - tok + 1; in strarray__strtoul_flags() 613 while (isspace(*tok)) in strarray__strtoul_flags() 614 ++tok; in strarray__strtoul_flags() 616 if (isalpha(*tok) || *tok == '_') { in strarray__strtoul_flags() 617 if (!strarray__strtoul(sa, tok, toklen, &val)) in strarray__strtoul_flags() 620 bool is_hexa = tok[0] == 0 && (tok[1] = 'x' || tok[1] == 'X'); in strarray__strtoul_flags() [all …]
|
D | builtin-sched.c | 1421 static int sort_dimension__add(const char *tok, struct list_head *list) in sort_dimension__add() argument 1453 if (!strcmp(available_sorts[i]->name, tok)) { in sort_dimension__add() 3325 char *tmp, *tok, *str = strdup(sched->sort_order); in setup_sorting() local 3327 for (tok = strtok_r(str, ", ", &tmp); in setup_sorting() 3328 tok; tok = strtok_r(NULL, ", ", &tmp)) { in setup_sorting() 3329 if (sort_dimension__add(tok, &sched->sort_list) < 0) { in setup_sorting() 3331 "Unknown --sort key: `%s'", tok); in setup_sorting()
|
/tools/testing/selftests/net/mptcp/ |
D | pm_nl_ctl.c | 223 char *tok, *str; in add_addr() local 231 for (str = argv[arg]; (tok = strtok(str, ",")); in add_addr() 233 if (!strcmp(tok, "subflow")) in add_addr() 235 else if (!strcmp(tok, "signal")) in add_addr() 237 else if (!strcmp(tok, "backup")) in add_addr()
|