Lines Matching refs:tok
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()
1056 *tok = strdup(buf); in __read_token()
1077 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1119 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1129 if (extend_token(tok, buf, tok_size + i + 1) < 0) in __read_token()
1141 if (strcmp(*tok, "LOCAL_PR_FMT") == 0) { in __read_token()
1142 free(*tok); in __read_token()
1143 *tok = NULL; in __read_token()
1144 return force_token("\"%s\" ", tok); in __read_token()
1145 } else if (strcmp(*tok, "STA_PR_FMT") == 0) { in __read_token()
1146 free(*tok); in __read_token()
1147 *tok = NULL; in __read_token()
1148 return force_token("\" sta:%pM\" ", tok); in __read_token()
1149 } else if (strcmp(*tok, "VIF_PR_FMT") == 0) { in __read_token()
1150 free(*tok); in __read_token()
1151 *tok = NULL; in __read_token()
1152 return force_token("\" vif:%p(%d)\" ", tok); in __read_token()
1159 static enum tep_event_type force_token(const char *str, char **tok) in force_token() argument
1173 type = __read_token(tok); in force_token()
1187 __hidden void free_token(char *tok) in free_token() argument
1189 if (tok) in free_token()
1190 free(tok); in free_token()
1202 __hidden enum tep_event_type read_token(char **tok) in read_token() argument
1207 type = __read_token(tok); in read_token()
1211 free_token(*tok); in read_token()
1215 *tok = NULL; in read_token()
1220 static enum tep_event_type read_token_item(char **tok) in read_token_item() argument
1225 type = __read_token(tok); in read_token_item()
1228 free_token(*tok); in read_token_item()
1229 *tok = NULL; in read_token_item()
1233 *tok = NULL; in read_token_item()
1264 static int __read_expect_type(enum tep_event_type expect, char **tok, int newline_ok) in __read_expect_type() argument
1269 type = read_token(tok); in __read_expect_type()
1271 type = read_token_item(tok); in __read_expect_type()
1275 static int read_expect_type(enum tep_event_type expect, char **tok) in read_expect_type() argument
1277 return __read_expect_type(expect, tok, 1); in read_expect_type()
1753 char **tok, enum tep_event_type type);
1756 process_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_arg() argument
1762 *tok = token; in process_arg()
1764 return process_arg_token(event, arg, tok, type); in process_arg()
1768 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok);
1775 process_field_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_field_arg() argument
1779 type = process_arg(event, arg, tok); in process_field_arg()
1782 type = process_op(event, arg, tok); in process_field_arg()
1789 process_cond(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_cond() argument
1811 *tok = NULL; in process_cond()
1833 *tok = token; in process_cond()
1845 process_array(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_array() argument
1855 *tok = NULL; in process_array()
1859 *tok = NULL; in process_array()
1868 *tok = token; in process_array()
1947 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_op() argument
1954 token = *tok; in process_op()
1989 *tok = NULL; in process_op()
1990 type = process_arg(event, right, tok); in process_op()
2007 type = process_cond(event, arg, tok); in process_op()
2048 *tok = token; in process_op()
2074 type = process_arg_token(event, right, tok, type); in process_op()
2113 type = process_array(event, arg, tok); in process_op()
2122 if (type == TEP_EVENT_OP && strcmp(*tok, ":") != 0) { in process_op()
2126 prio = get_op_prio(*tok); in process_op()
2129 return process_op(event, arg, tok); in process_op()
2131 return process_op(event, right, tok); in process_op()
2140 *tok = NULL; in process_op()
2146 char **tok) in process_entry() argument
2173 *tok = token; in process_entry()
2180 *tok = NULL; in process_entry()
2519 process_fields(struct tep_event *event, struct tep_print_flag_sym **list, char **tok) in process_fields() argument
2524 char *token = *tok; in process_fields()
2586 *tok = token; in process_fields()
2594 *tok = NULL; in process_fields()
2600 process_flags(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_flags() argument
2641 type = read_token_item(tok); in process_flags()
2648 *tok = NULL; in process_flags()
2653 process_symbols(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_symbols() argument
2680 type = read_token_item(tok); in process_symbols()
2687 *tok = NULL; in process_symbols()
2693 char **tok, enum tep_print_arg_type type) in process_hex_common() argument
2704 return read_token_item(tok); in process_hex_common()
2710 *tok = NULL; in process_hex_common()
2715 process_hex(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_hex() argument
2717 return process_hex_common(event, arg, tok, TEP_PRINT_HEX); in process_hex()
2722 char **tok) in process_hex_str() argument
2724 return process_hex_common(event, arg, tok, TEP_PRINT_HEX_STR); in process_hex_str()
2728 process_int_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_int_array() argument
2742 return read_token_item(tok); in process_int_array()
2751 *tok = NULL; in process_int_array()
2756 process_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_dynamic_array() argument
2770 *tok = token; in process_dynamic_array()
2788 *tok = token; in process_dynamic_array()
2796 *tok = NULL; in process_dynamic_array()
2808 type = read_token_item(tok); in process_dynamic_array()
2815 *tok = NULL; in process_dynamic_array()
2821 char **tok) in process_dynamic_array_len() argument
2845 *tok = token; in process_dynamic_array_len()
2852 *tok = NULL; in process_dynamic_array_len()
2857 process_paren(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_paren() argument
2909 *tok = token; in process_paren()
2914 *tok = NULL; in process_paren()
2921 char **tok) in process_str() argument
2937 *tok = token; in process_str()
2944 *tok = NULL; in process_str()
2950 char **tok) in process_bitmask() argument
2966 *tok = token; in process_bitmask()
2973 *tok = NULL; in process_bitmask()
3011 struct tep_print_arg *arg, char **tok) in process_func_handler() argument
3022 *tok = NULL; in process_func_handler()
3057 *tok = token; in process_func_handler()
3068 process_builtin_expect(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_builtin_expect() argument
3089 type = read_token_item(tok); in process_builtin_expect()
3094 *tok = NULL; in process_builtin_expect()
3100 char *token, char **tok) in process_function() argument
3107 return process_flags(event, arg, tok); in process_function()
3112 return process_symbols(event, arg, tok); in process_function()
3116 return process_hex(event, arg, tok); in process_function()
3120 return process_hex_str(event, arg, tok); in process_function()
3124 return process_int_array(event, arg, tok); in process_function()
3128 return process_str(event, arg, tok); in process_function()
3132 return process_bitmask(event, arg, tok); in process_function()
3136 return process_dynamic_array(event, arg, tok); in process_function()
3140 return process_dynamic_array_len(event, arg, tok); in process_function()
3144 return process_builtin_expect(event, arg, tok); in process_function()
3150 return process_func_handler(event, func, arg, tok); in process_function()
3160 char **tok, enum tep_event_type type) in process_arg_token() argument
3165 token = *tok; in process_arg_token()
3196 *tok = NULL; in process_arg_token()
3239 *tok = token; in process_arg_token()