• Home
  • Raw
  • Download

Lines Matching refs:str

762 static int errpos(char *str)  in errpos()  argument
764 if (!str || !last_cmd) in errpos()
767 return err_pos(last_cmd, str); in errpos()
770 static void last_cmd_set(struct trace_event_file *file, char *str) in last_cmd_set() argument
776 if (!str) in last_cmd_set()
780 len = sizeof(HIST_PREFIX) + strlen(str); in last_cmd_set()
789 strncat(last_cmd, str, len); in last_cmd_set()
1395 static int parse_map_size(char *str) in parse_map_size() argument
1400 ret = kstrtoul(str, 0, &size); in parse_map_size()
1435 static int parse_action(char *str, struct hist_trigger_attrs *attrs) in parse_action() argument
1442 if ((str_has_prefix(str, "onmatch(")) || in parse_action()
1443 (str_has_prefix(str, "onmax(")) || in parse_action()
1444 (str_has_prefix(str, "onchange("))) { in parse_action()
1445 attrs->action_str[attrs->n_actions] = kstrdup(str, GFP_KERNEL); in parse_action()
1457 char *str, struct hist_trigger_attrs *attrs) in parse_assignment() argument
1461 if ((len = str_has_prefix(str, "key=")) || in parse_assignment()
1462 (len = str_has_prefix(str, "keys="))) { in parse_assignment()
1463 attrs->keys_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1468 } else if ((len = str_has_prefix(str, "val=")) || in parse_assignment()
1469 (len = str_has_prefix(str, "vals=")) || in parse_assignment()
1470 (len = str_has_prefix(str, "values="))) { in parse_assignment()
1471 attrs->vals_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1476 } else if ((len = str_has_prefix(str, "sort="))) { in parse_assignment()
1477 attrs->sort_key_str = kstrdup(str + len, GFP_KERNEL); in parse_assignment()
1482 } else if (str_has_prefix(str, "name=")) { in parse_assignment()
1483 attrs->name = kstrdup(str, GFP_KERNEL); in parse_assignment()
1488 } else if ((len = str_has_prefix(str, "clock="))) { in parse_assignment()
1489 str += len; in parse_assignment()
1491 str = strstrip(str); in parse_assignment()
1492 attrs->clock = kstrdup(str, GFP_KERNEL); in parse_assignment()
1497 } else if ((len = str_has_prefix(str, "size="))) { in parse_assignment()
1498 int map_bits = parse_map_size(str + len); in parse_assignment()
1509 hist_err(tr, HIST_ERR_TOO_MANY_VARS, errpos(str)); in parse_assignment()
1514 assignment = kstrdup(str, GFP_KERNEL); in parse_assignment()
1537 char *str = strsep(&trigger_str, ":"); in parse_hist_trigger_attrs() local
1540 rhs = strchr(str, '='); in parse_hist_trigger_attrs()
1544 hist_err(tr, HIST_ERR_EMPTY_ASSIGNMENT, errpos(str)); in parse_hist_trigger_attrs()
1547 ret = parse_assignment(tr, str, attrs); in parse_hist_trigger_attrs()
1550 } else if (strcmp(str, "pause") == 0) in parse_hist_trigger_attrs()
1552 else if ((strcmp(str, "cont") == 0) || in parse_hist_trigger_attrs()
1553 (strcmp(str, "continue") == 0)) in parse_hist_trigger_attrs()
1555 else if (strcmp(str, "clear") == 0) in parse_hist_trigger_attrs()
1558 ret = parse_action(str, attrs); in parse_hist_trigger_attrs()
1722 char str[HIST_CONST_DIGITS_MAX]; in expr_field_str() local
1724 snprintf(str, HIST_CONST_DIGITS_MAX, "%llu", field->constant); in expr_field_str()
1725 strcat(expr, str); in expr_field_str()
1802 static int contains_operator(char *str, char **sep) in contains_operator() argument
1822 minus_op = strrchr(str, '-'); in contains_operator()
1828 if (minus_op == str) { in contains_operator()
1836 plus_op = strrchr(str, '+'); in contains_operator()
1851 div_op = strrchr(str, '/'); in contains_operator()
1855 mult_op = strrchr(str, '*'); in contains_operator()
2283 char *field_name, *modifier, *str; in parse_field() local
2286 modifier = str = kstrdup(field_str, GFP_KERNEL); in parse_field()
2367 kfree(str); in parse_field()
2397 char *str, char *var_name, in parse_const() argument
2404 if (kstrtoull(str, 0, &constant)) { in parse_const()
2405 hist_err(tr, HIST_ERR_EXPECT_NUMBER, errpos(str)); in parse_const()
2420 struct trace_event_file *file, char *str, in parse_atom() argument
2423 char *s, *ref_system = NULL, *ref_event = NULL, *ref_var = str; in parse_atom()
2429 if (isdigit(str[0])) { in parse_atom()
2430 hist_field = parse_const(hist_data, str, var_name, flags); in parse_atom()
2438 s = strchr(str, '.'); in parse_atom()
2442 ref_system = strsep(&str, "."); in parse_atom()
2443 if (!str) { in parse_atom()
2447 ref_event = strsep(&str, "."); in parse_atom()
2448 if (!str) { in parse_atom()
2452 ref_var = str; in parse_atom()
2471 str = s; in parse_atom()
2473 field = parse_field(hist_data, file, str, flags, &buckets); in parse_atom()
2493 char *str, unsigned long flags,
2498 char *str, unsigned long flags, in parse_unary() argument
2512 hist_err(file->tr, HIST_ERR_TOO_MANY_SUBEXPR, errpos(str)); in parse_unary()
2517 str++; /* skip leading '-' */ in parse_unary()
2519 s = strchr(str, '('); in parse_unary()
2521 str++; in parse_unary()
2527 s = strrchr(str, ')'); in parse_unary()
2532 errpos(str)); in parse_unary()
2551 operand1 = parse_expr(hist_data, file, str, operand_flags, NULL, n_subexprs); in parse_unary()
2558 hist_err(file->tr, HIST_ERR_INVALID_STR_OPERAND, errpos(str)); in parse_unary()
2630 char *str, unsigned long flags, in parse_expr() argument
2642 hist_err(file->tr, HIST_ERR_TOO_MANY_SUBEXPR, errpos(str)); in parse_expr()
2646 field_op = contains_operator(str, &sep); in parse_expr()
2649 return parse_atom(hist_data, file, str, &flags, var_name); in parse_expr()
2652 return parse_unary(hist_data, file, str, flags, var_name, n_subexprs); in parse_expr()
2662 operand1_str = str; in parse_expr()
2663 str = sep+1; in parse_expr()
2666 if (*operand1_str == '\0' || *str == '\0') in parse_expr()
2684 operand2 = parse_expr(hist_data, file, str, operand_flags, NULL, n_subexprs); in parse_expr()
2690 hist_err(file->tr, HIST_ERR_INVALID_STR_OPERAND, errpos(str)); in parse_expr()
2749 hist_err(file->tr, HIST_ERR_DIVISION_BY_ZERO, errpos(str)); in parse_expr()
3113 char *str = elt_data->field_var_str[j++]; in __update_field_vars() local
3118 strscpy(str, val_str, size); in __update_field_vars()
3119 var_val = (u64)(uintptr_t)str; in __update_field_vars()
3643 static int action_parse(struct trace_array *tr, char *str, struct action_data *data, in action_parse() argument
3649 strsep(&str, "."); in action_parse()
3650 if (!str) { in action_parse()
3656 action_name = strsep(&str, "("); in action_parse()
3657 if (!action_name || !str) { in action_parse()
3664 char *params = strsep(&str, ")"); in action_parse()
3690 char *params = strsep(&str, ")"); in action_parse()
3692 if (!str) { in action_parse()
3712 char *params = strsep(&str, ")"); in action_parse()
3749 char *str, enum handler_id handler) in track_data_parse() argument
3759 var_str = strsep(&str, ")"); in track_data_parse()
3760 if (!var_str || !str) { in track_data_parse()
3771 ret = action_parse(hist_data->event_file->tr, str, data, handler); in track_data_parse()
4114 static struct action_data *onmatch_parse(struct trace_array *tr, char *str) in onmatch_parse() argument
4124 match_event = strsep(&str, ")"); in onmatch_parse()
4125 if (!match_event || !str) { in onmatch_parse()
4153 ret = action_parse(tr, str, data, HANDLER_ONMATCH); in onmatch_parse()
4534 char *s, *str, *var_name, *field_str; in parse_var_defs() local
4539 str = hist_data->attrs->assignment_str[i]; in parse_var_defs()
4541 field_str = strsep(&str, ","); in parse_var_defs()
4611 static int is_descending(struct trace_array *tr, const char *str) in is_descending() argument
4613 if (!str) in is_descending()
4616 if (strcmp(str, "descending") == 0) in is_descending()
4619 if (strcmp(str, "ascending") == 0) in is_descending()
4622 hist_err(tr, HIST_ERR_INVALID_SORT_MODIFIER, errpos((char *)str)); in is_descending()
4737 char *str; in parse_actions() local
4741 str = hist_data->attrs->action_str[i]; in parse_actions()
4743 if ((len = str_has_prefix(str, "onmatch("))) { in parse_actions()
4744 char *action_str = str + len; in parse_actions()
4751 } else if ((len = str_has_prefix(str, "onmax("))) { in parse_actions()
4752 char *action_str = str + len; in parse_actions()
4760 } else if ((len = str_has_prefix(str, "onchange("))) { in parse_actions()
4761 char *action_str = str + len; in parse_actions()
5100 char *str, *val_str; in hist_trigger_elt_update() local
5108 str = elt_data->field_var_str[idx]; in hist_trigger_elt_update()
5112 strscpy(str, val_str, size); in hist_trigger_elt_update()
5114 hist_val = (u64)(uintptr_t)str; in hist_trigger_elt_update()