Home
last modified time | relevance | path

Searched refs:token (Results 1 – 25 of 28) sorted by relevance

12

/tools/perf/pmu-events/
Djsmn.c47 static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, in jsmn_fill_token() argument
50 token->type = type; in jsmn_fill_token()
51 token->start = start; in jsmn_fill_token()
52 token->end = end; in jsmn_fill_token()
53 token->size = 0; in jsmn_fill_token()
63 jsmntok_t *token; in jsmn_parse_primitive() local
103 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive()
104 if (token == NULL) { in jsmn_parse_primitive()
108 jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); in jsmn_parse_primitive()
120 jsmntok_t *token; in jsmn_parse_string() local
[all …]
/tools/lib/traceevent/
Devent-parse.c1247 static int test_type_token(enum tep_event_type type, const char *token, in test_type_token() argument
1256 if (strcmp(token, expect_tok) != 0) { in test_type_token()
1258 expect_tok, token); in test_type_token()
1284 char *token; in __read_expected() local
1288 type = read_token(&token); in __read_expected()
1290 type = read_token_item(&token); in __read_expected()
1292 ret = test_type_token(type, token, expect, str); in __read_expected()
1294 free_token(token); in __read_expected()
1311 char *token; in event_read_name() local
1319 if (read_expect_type(TEP_EVENT_ITEM, &token) < 0) in event_read_name()
[all …]
Dparse-filter.c63 char *token = NULL; in filter_read_token() local
66 free_token(token); in filter_read_token()
67 type = read_token(&token); in filter_read_token()
71 if (token && in filter_read_token()
72 (strcmp(token, "=") == 0 || strcmp(token, "!") == 0) && in filter_read_token()
77 free_token(token); in filter_read_token()
80 sprintf(*tok, "%c%c", *token, '~'); in filter_read_token()
81 free_token(token); in filter_read_token()
83 read_token(&token); in filter_read_token()
84 free_token(token); in filter_read_token()
[all …]
/tools/wmi/
Ddell-smbios-example.c53 static int find_token(__u16 token, __u16 *location, __u16 *value) in find_token() argument
61 ret = sprintf(value_sysfs, "%s/%04x_value", token_sysfs, token); in find_token()
75 ret = sprintf(location_sysfs, "%s/%04x_location", token_sysfs, token); in find_token()
109 static int query_token(__u16 token, struct dell_wmi_smbios_buffer *buffer) in query_token() argument
115 ret = find_token(token, &location, &value); in query_token()
117 printf("unable to find token %04x\n", token); in query_token()
124 __u16 token) in activate_token() argument
130 ret = find_token(token, &location, &value); in activate_token()
132 printf("unable to find token %04x\n", token); in activate_token()
/tools/testing/selftests/resctrl/
Dresctrl_tests.c164 char *token; in main() local
168 token = strtok(optarg, ","); in main()
174 while (token) { in main()
175 if (!strncmp(token, MBM_STR, sizeof(MBM_STR))) { in main()
178 } else if (!strncmp(token, MBA_STR, sizeof(MBA_STR))) { in main()
181 } else if (!strncmp(token, CMT_STR, sizeof(CMT_STR))) { in main()
184 } else if (!strncmp(token, CAT_STR, sizeof(CAT_STR))) { in main()
192 token = strtok(NULL, ","); in main()
Dcmt_test.c58 char *token = strtok(temp, ":\t"); in check_results() local
61 while (token) { in check_results()
62 token_array[fields++] = token; in check_results()
63 token = strtok(NULL, ":\t"); in check_results()
Dmbm_test.c69 char *token = strtok(temp, ":\t"); in check_results() local
72 while (token) { in check_results()
73 token_array[i++] = token; in check_results()
74 token = strtok(NULL, ":\t"); in check_results()
Dmba_test.c123 char *token = strtok(temp, ":\t"); in check_results() local
126 while (token) { in check_results()
127 token_array[fields++] = token; in check_results()
128 token = strtok(NULL, ":\t"); in check_results()
Dcat_test.c71 char *token = strtok(temp, ":\t"); in check_results() local
74 while (token) { in check_results()
75 token_array[fields++] = token; in check_results()
76 token = strtok(NULL, ":\t"); in check_results()
Dresctrl_val.c102 char *token[MAX_TOKENS]; in get_event_and_umask() local
106 token[0] = strtok(cas_count_cfg, "=,"); in get_event_and_umask()
109 token[i] = strtok(NULL, "=,"); in get_event_and_umask()
112 if (!token[i]) in get_event_and_umask()
114 if (strcmp(token[i], "event") == 0) { in get_event_and_umask()
117 strtol(token[i + 1], NULL, 16); in get_event_and_umask()
120 strtol(token[i + 1], NULL, 16); in get_event_and_umask()
122 if (strcmp(token[i], "umask") == 0) { in get_event_and_umask()
125 strtol(token[i + 1], NULL, 16); in get_event_and_umask()
128 strtol(token[i + 1], NULL, 16); in get_event_and_umask()
Dresctrlfs.c261 char *token = strtok(cpu_list_str, "-,"); in get_core_sibling() local
263 while (token) { in get_core_sibling()
264 sibling_cpu_no = atoi(token); in get_core_sibling()
268 token = strtok(NULL, "-,"); in get_core_sibling()
/tools/perf/util/
Dexpr.l13 static double __value(YYSTYPE *yylval, char *str, int token) in __value() argument
23 return token; in __value()
70 static int str(yyscan_t scanner, int token, int runtime) in str() argument
80 return token; in str()
Dexpr.y35 %token EXPR_PARSE EXPR_OTHER EXPR_ERROR
36 %token <num> NUMBER
37 %token <str> ID
39 %token MIN MAX IF ELSE SMT_ON D_RATIO
Dpmu.y23 %token PP_CONFIG
24 %token PP_VALUE PP_ERROR
Dparse-events.y62 %token PE_START_EVENTS PE_START_TERMS
63 %token PE_VALUE PE_VALUE_SYM_HW PE_VALUE_SYM_SW PE_RAW PE_TERM
64 %token PE_VALUE_SYM_TOOL
65 %token PE_EVENT_NAME
66 %token PE_NAME
67 %token PE_BPF_OBJECT PE_BPF_SOURCE
68 %token PE_MODIFIER_EVENT PE_MODIFIER_BP
69 %token PE_NAME_CACHE_TYPE PE_NAME_CACHE_OP_RESULT
70 %token PE_PREFIX_MEM PE_PREFIX_RAW PE_PREFIX_GROUP
71 %token PE_ERROR
[all …]
Dparse-events.l23 static int __value(YYSTYPE *yylval, char *str, int base, int token) in __value() argument
33 return token; in __value()
44 static int str(yyscan_t scanner, int token) in str() argument
64 return token; in str()
113 static int drv_str(yyscan_t scanner, int token) in drv_str() argument
120 return token; in drv_str()
/tools/testing/selftests/powerpc/syscalls/
Drtas_filter.c40 __be32 token; member
174 int i, rc, token; in rtas_call() local
179 token = rtas_token(name); in rtas_call()
180 if (token == RTAS_UNKNOWN_OP) { in rtas_call()
187 args.token = cpu_to_be32(token); in rtas_call()
/tools/power/cpupower/utils/idle_monitor/
Dcpupower-monitor.c224 char *tmp = param, *token; in parse_monitor_param() local
229 token = strtok(tmp, ","); in parse_monitor_param()
230 if (token == NULL) in parse_monitor_param()
232 if (strlen(token) >= MONITOR_NAME_LEN) { in parse_monitor_param()
234 " (%d) exceeded\n"), token, MONITOR_NAME_LEN); in parse_monitor_param()
239 if (!strcmp(monitors[num]->name, token)) { in parse_monitor_param()
240 dprint("Found requested monitor: %s\n", token); in parse_monitor_param()
/tools/testing/selftests/bpf/prog_tests/
Dtc_redirect.c141 struct nstoken *token; in open_netns() local
143 token = malloc(sizeof(struct nstoken)); in open_netns()
144 if (!ASSERT_OK_PTR(token, "malloc token")) in open_netns()
147 token->orig_netns_fd = open("/proc/self/ns/net", O_RDONLY); in open_netns()
148 if (!ASSERT_GE(token->orig_netns_fd, 0, "open /proc/self/ns/net")) in open_netns()
160 return token; in open_netns()
162 free(token); in open_netns()
166 static void close_netns(struct nstoken *token) in close_netns() argument
168 ASSERT_OK(setns_by_fd(token->orig_netns_fd), "setns_by_fd"); in close_netns()
169 free(token); in close_netns()
/tools/bpf/
Dbpf_exp.y54 %token OP_LDB OP_LDH OP_LD OP_LDX OP_ST OP_STX OP_JMP OP_JEQ OP_JGT OP_JGE
55 %token OP_JSET OP_ADD OP_SUB OP_MUL OP_DIV OP_AND OP_OR OP_XOR OP_LSH OP_RSH
56 %token OP_RET OP_TAX OP_TXA OP_LDXB OP_MOD OP_NEG OP_JNEQ OP_JLT OP_JLE OP_LDI
57 %token OP_LDXI
59 %token K_PKT_LEN
61 %token ':' ',' '[' ']' '(' ')' 'x' 'a' '+' 'M' '*' '&' '#' '%'
63 %token extension number label
Dbpf_dbg.c1006 char sp, *token, separator = ','; in cmd_load_bpf() local
1019 token = bpf_string; in cmd_load_bpf()
1020 while ((token = strchr(token, separator)) && (++token)[0]) { in cmd_load_bpf()
1026 if (sscanf(token, "%hu %hhu %hhu %u,", in cmd_load_bpf()
/tools/testing/selftests/arm64/signal/
Dtest_signals_utils.c128 si->si_addr, si->si_code, td->token, td->token - si->si_addr); in handle_signal_ok()
135 if (!td->sanity_disabled && !td->token) { in handle_signal_ok()
Dtest_signals.h49 void *token; member
/tools/testing/selftests/netfilter/
Dnft_concat_range.sh1103 for token in $(nft list counter inet filter test); do
1104 [ ${found} -eq 1 ] && echo "${token}" && return
1105 [ "${token}" = "packets" ] && found=1
1112 for token in $(nft list counter netdev perf test); do
1113 [ ${found} -eq 1 ] && echo "${token}" && return
1114 [ "${token}" = "packets" ] && found=1
/tools/testing/selftests/bpf/
Dxdpxceiver.c386 char *sptr, *token; in parse_command_line() local
391 token = strsep(&sptr, ","); in parse_command_line()
392 if (token) in parse_command_line()
393 memcpy(ifdict[interface_index]->nsname, token, in parse_command_line()

12