Lines Matching refs:arg

320 static int parse_probe_vars(char *arg, const struct fetch_type *t,  in parse_probe_vars()  argument
327 if (strcmp(arg, "retval") == 0) { in parse_probe_vars()
332 } else if (strncmp(arg, "stack", 5) == 0) { in parse_probe_vars()
333 if (arg[5] == '\0') { in parse_probe_vars()
341 } else if (isdigit(arg[5])) { in parse_probe_vars()
342 ret = kstrtoul(arg + 5, 10, &param); in parse_probe_vars()
358 static int parse_probe_arg(char *arg, const struct fetch_type *t, in parse_probe_arg() argument
367 switch (arg[0]) { in parse_probe_arg()
369 ret = parse_probe_vars(arg + 1, t, f, is_return, is_kprobe); in parse_probe_arg()
373 ret = regs_query_register_offset(arg + 1); in parse_probe_arg()
382 if (isdigit(arg[1])) { in parse_probe_arg()
383 ret = kstrtoul(arg + 1, 0, &param); in parse_probe_arg()
389 } else if (arg[1] == '+') { in parse_probe_arg()
394 ret = kstrtol(arg + 2, 0, &offset); in parse_probe_arg()
405 ret = traceprobe_split_symbol_offset(arg + 1, &offset); in parse_probe_arg()
409 f->data = alloc_symbol_cache(arg + 1, offset); in parse_probe_arg()
416 arg++; /* Skip '+', because kstrtol() rejects it. */ in parse_probe_arg()
418 tmp = strchr(arg, '('); in parse_probe_arg()
423 ret = kstrtol(arg, 0, &offset); in parse_probe_arg()
428 arg = tmp + 1; in parse_probe_arg()
429 tmp = strrchr(arg, ')'); in parse_probe_arg()
446 ret = parse_probe_arg(arg, t2, &dprm->orig, is_return, in parse_probe_arg()
504 int traceprobe_parse_probe_arg(char *arg, ssize_t *size, in traceprobe_parse_probe_arg() argument
511 if (strlen(arg) > MAX_ARGSTR_LEN) { in traceprobe_parse_probe_arg()
512 pr_info("Argument is too long.: %s\n", arg); in traceprobe_parse_probe_arg()
515 parg->comm = kstrdup(arg, GFP_KERNEL); in traceprobe_parse_probe_arg()
517 pr_info("Failed to allocate memory for command '%s'.\n", arg); in traceprobe_parse_probe_arg()
522 arg[t - parg->comm] = '\0'; in traceprobe_parse_probe_arg()
532 ret = parse_probe_arg(arg, parg->type, &parg->fetch, is_return, in traceprobe_parse_probe_arg()
565 void traceprobe_update_arg(struct probe_arg *arg) in traceprobe_update_arg() argument
567 if (CHECK_FETCH_FUNCS(bitfield, arg->fetch.fn)) in traceprobe_update_arg()
568 update_bitfield_fetch_param(arg->fetch.data); in traceprobe_update_arg()
569 else if (CHECK_FETCH_FUNCS(deref, arg->fetch.fn)) in traceprobe_update_arg()
570 update_deref_fetch_param(arg->fetch.data); in traceprobe_update_arg()
571 else if (CHECK_FETCH_FUNCS(symbol, arg->fetch.fn)) in traceprobe_update_arg()
572 update_symbol_cache(arg->fetch.data); in traceprobe_update_arg()
575 void traceprobe_free_probe_arg(struct probe_arg *arg) in traceprobe_free_probe_arg() argument
577 if (CHECK_FETCH_FUNCS(bitfield, arg->fetch.fn)) in traceprobe_free_probe_arg()
578 free_bitfield_fetch_param(arg->fetch.data); in traceprobe_free_probe_arg()
579 else if (CHECK_FETCH_FUNCS(deref, arg->fetch.fn)) in traceprobe_free_probe_arg()
580 free_deref_fetch_param(arg->fetch.data); in traceprobe_free_probe_arg()
581 else if (CHECK_FETCH_FUNCS(symbol, arg->fetch.fn)) in traceprobe_free_probe_arg()
582 free_symbol_cache(arg->fetch.data); in traceprobe_free_probe_arg()
584 kfree(arg->name); in traceprobe_free_probe_arg()
585 kfree(arg->comm); in traceprobe_free_probe_arg()
669 const char *fmt, *arg; in __set_print_fmt() local
673 arg = "REC->" FIELD_STRING_IP; in __set_print_fmt()
676 arg = "REC->" FIELD_STRING_FUNC ", REC->" FIELD_STRING_RETIP; in __set_print_fmt()
689 pos += snprintf(buf + pos, LEN_OR_ZERO, "\", %s", arg); in __set_print_fmt()