Home
last modified time | relevance | path

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

/tools/perf/pmu-events/
Djsmn.c34 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()
Djevents.c343 jsmntok_t *tokens, *tok; in json_events() local
354 tok = tokens + 1; in json_events()
362 jsmntok_t *obj = tok++; in json_events()
369 field = tok + j; in json_events()
370 EXPECT(field->type == JSMN_STRING, tok + j, in json_events()
372 val = tok + j + 1; in json_events()
373 EXPECT(val->type == JSMN_STRING, tok + j + 1, in json_events()
429 tok += j; in json_events()
431 EXPECT(tok - tokens == len, tok, "unexpected objects at end"); in json_events()
/tools/lib/traceevent/
Devent-parse.c923 static int extend_token(char **tok, char *buf, int size) in extend_token() argument
925 char *newtok = realloc(*tok, size); in extend_token()
928 free(*tok); in extend_token()
929 *tok = NULL; in extend_token()
933 if (!*tok) in extend_token()
937 *tok = newtok; in extend_token()
942 static enum event_type force_token(const char *str, char **tok);
944 static enum event_type __read_token(char **tok) in __read_token() argument
952 *tok = NULL; in __read_token()
968 if (asprintf(tok, "%c", ch) < 0) in __read_token()
[all …]
Dparse-filter.c78 static enum event_type read_token(char **tok) in read_token() argument
93 *tok = malloc(3); in read_token()
94 if (*tok == NULL) { in read_token()
98 sprintf(*tok, "%c%c", *token, '~'); in read_token()
104 *tok = token; in read_token()
Devent-parse.h801 enum event_type pevent_read_token(char **tok);
/tools/perf/util/
Dmem-events.c45 char *tok, *saveptr = NULL; in perf_mem_events__parse() local
57 tok = strtok_r((char *)buf, ",", &saveptr); in perf_mem_events__parse()
59 while (tok) { in perf_mem_events__parse()
63 if (strstr(e->tag, tok)) in perf_mem_events__parse()
67 tok = strtok_r(NULL, ",", &saveptr); in perf_mem_events__parse()
Dcallchain.c106 char *tok; in __parse_callchain_report_opt() local
118 while ((tok = strtok((char *)arg, ",")) != NULL) { in __parse_callchain_report_opt()
119 if (!strncmp(tok, "none", strlen(tok))) { in __parse_callchain_report_opt()
126 if (!parse_callchain_mode(tok) || in __parse_callchain_report_opt()
127 !parse_callchain_order(tok) || in __parse_callchain_report_opt()
128 !parse_callchain_sort_key(tok) || in __parse_callchain_report_opt()
129 !parse_callchain_value(tok)) { in __parse_callchain_report_opt()
134 if (parse_callchain_record(tok, &callchain_param)) in __parse_callchain_report_opt()
149 if (get_stack_size(tok, &size) < 0) in __parse_callchain_report_opt()
155 callchain_param.min_percent = strtod(tok, &endptr); in __parse_callchain_report_opt()
[all …]
Dsort.c2173 static int add_dynamic_entry(struct perf_evlist *evlist, const char *tok, in add_dynamic_entry() argument
2185 str = strdup(tok); in add_dynamic_entry()
2316 int sort_dimension__add(struct perf_hpp_list *list, const char *tok, in sort_dimension__add() argument
2325 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2365 if (strncasecmp(tok, hd->name, strlen(tok))) in sort_dimension__add()
2374 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2390 if (strncasecmp(tok, sd->name, strlen(tok))) in sort_dimension__add()
2406 if (!add_dynamic_entry(evlist, tok, level)) in sort_dimension__add()
2415 char *tmp, *tok; in setup_sort_list() local
2422 tok = str; in setup_sort_list()
[all …]
Dutil.c491 char *tok, *name, *saveptr = NULL; in parse_callchain_record() local
502 tok = strtok_r((char *)buf, ",", &saveptr); in parse_callchain_record()
503 name = tok ? : (char *)buf; in parse_callchain_record()
524 tok = strtok_r(NULL, ",", &saveptr); in parse_callchain_record()
525 if (tok) { in parse_callchain_record()
528 ret = get_stack_size(tok, &size); in parse_callchain_record()
Dsort.h273 int sort_dimension__add(struct perf_hpp_list *list, const char *tok,
276 int output_field_add(struct perf_hpp_list *list, char *tok);
Dannotate.c59 char *endptr, *tok, *name; in call__parse() local
74 tok = strchr(name, '>'); in call__parse()
75 if (tok == NULL) in call__parse()
78 *tok = '\0'; in call__parse()
80 *tok = '>'; in call__parse()
85 tok = strchr(endptr, '*'); in call__parse()
86 if (tok == NULL) { in call__parse()
95 ops->target.addr = strtoull(tok + 1, NULL, 16); in call__parse()
/tools/perf/bench/
Dnuma.c502 char *tok, *tok_end, *tok_step, *tok_len, *tok_mul; in parse_setup_cpu_list() local
507 tok = strsep(&str, ","); in parse_setup_cpu_list()
508 if (!tok) in parse_setup_cpu_list()
511 tok_end = strstr(tok, "-"); in parse_setup_cpu_list()
513 dprintf("\ntoken: {%s}, end: {%s}\n", tok, tok_end); in parse_setup_cpu_list()
516 bind_cpu_0 = bind_cpu_1 = atol(tok); in parse_setup_cpu_list()
519 bind_cpu_0 = atol(tok); in parse_setup_cpu_list()
524 tok_step = strstr(tok, "#"); in parse_setup_cpu_list()
536 tok_len = strstr(tok, "_"); in parse_setup_cpu_list()
544 tok_mul = strstr(tok, "x"); in parse_setup_cpu_list()
[all …]
/tools/perf/
Dbuiltin-kmem.c1630 static int slab_sort_dimension__add(const char *tok, struct list_head *list) in slab_sort_dimension__add() argument
1636 if (!strcmp(slab_sorts[i]->name, tok)) { in slab_sort_dimension__add()
1650 static int page_sort_dimension__add(const char *tok, struct list_head *list) in page_sort_dimension__add() argument
1656 if (!strcmp(page_sorts[i]->name, tok)) { in page_sort_dimension__add()
1672 char *tok; in setup_slab_sorting() local
1682 tok = strsep(&pos, ","); in setup_slab_sorting()
1683 if (!tok) in setup_slab_sorting()
1685 if (slab_sort_dimension__add(tok, sort_list) < 0) { in setup_slab_sorting()
1686 error("Unknown slab --sort key: '%s'", tok); in setup_slab_sorting()
1698 char *tok; in setup_page_sorting() local
[all …]
Dbuiltin-script.c1402 char *tok; in parse_output_fields() local
1416 tok = strchr(str, ':'); in parse_output_fields()
1417 if (tok) { in parse_output_fields()
1418 *tok = '\0'; in parse_output_fields()
1419 tok++; in parse_output_fields()
1445 tok = str; in parse_output_fields()
1463 for (tok = strtok(tok, ","); tok; tok = strtok(NULL, ",")) { in parse_output_fields()
1465 if (strcmp(tok, all_output_options[i].str) == 0) in parse_output_fields()
1468 if (i == imax && strcmp(tok, "flags") == 0) { in parse_output_fields()
Dbuiltin-sched.c1285 static int sort_dimension__add(const char *tok, struct list_head *list) in sort_dimension__add() argument
1317 if (!strcmp(available_sorts[i]->name, tok)) { in sort_dimension__add()
1882 char *tmp, *tok, *str = strdup(sched->sort_order); in setup_sorting() local
1884 for (tok = strtok_r(str, ", ", &tmp); in setup_sorting()
1885 tok; tok = strtok_r(NULL, ", ", &tmp)) { in setup_sorting()
1886 if (sort_dimension__add(tok, &sched->sort_list) < 0) { in setup_sorting()
1888 "Unknown --sort key: `%s'", tok); in setup_sorting()