Lines Matching refs:parg
1289 static char *parse_probe_arg_type(char *arg, struct probe_arg *parg,
1314 if (kstrtouint(t2, 0, &parg->count) || !parg->count) {
1319 if (parg->count > MAX_ARRAY_LEN) {
1336 if (parg->count || (t && strcmp(t, "string"))) {
1340 parg->type = find_fetch_type("string", ctx->flags);
1342 parg->type = find_fetch_type(t, ctx->flags);
1344 if (!parg->type) {
1354 struct probe_arg *parg,
1363 if (parg->type->is_string) {
1365 if (!strcmp(parg->type->name, "symstr")) {
1383 if (!strcmp(parg->type->name, "symstr") ||
1386 parg->count) {
1389 * must be kept, and if parg->count != 0, this is an
1403 if (!strcmp(parg->type->name, "ustring") ||
1406 else if (!strcmp(parg->type->name, "symstr"))
1410 code->size = parg->type->size;
1411 parg->dynamic = true;
1414 code->size = parg->type->size;
1417 code->size = parg->type->size;
1425 code->size = parg->type->size;
1434 ret = __parse_bitfield_probe_arg(type, parg->type, &code);
1448 if (parg->count) {
1461 code->param = parg->count;
1473 struct probe_arg *parg,
1493 parg->comm = kstrdup(arg, GFP_KERNEL);
1494 if (!parg->comm)
1497 type = parse_probe_arg_type(arg, parg, ctx);
1507 ret = parse_probe_arg(arg, parg->type, &code, &code[FETCH_INSN_MAX - 1],
1516 parg->type = find_fetch_type_from_btf_type(ctx);
1523 parg->offset = *size;
1524 *size += parg->type->size * (parg->count ?: 1);
1526 if (parg->count) {
1527 len = strlen(parg->type->fmttype) + 6;
1528 parg->fmt = kmalloc(len, GFP_KERNEL);
1529 if (!parg->fmt) {
1533 snprintf(parg->fmt, len, "%s[%d]", parg->type->fmttype,
1534 parg->count);
1537 ret = finalize_fetch_insn(code, parg, type, type ? type - arg : 0, ctx);
1545 parg->code = kcalloc(code - tmp + 1, sizeof(*code), GFP_KERNEL);
1546 if (!parg->code)
1549 memcpy(parg->code, tmp, sizeof(*code) * (code - tmp + 1));
1610 struct probe_arg *parg = &tp->args[i];
1623 parg->name = kmemdup_nul(arg, body - arg, GFP_KERNEL);
1626 parg->name = generate_probe_arg_name(arg, i);
1629 if (!parg->name)
1632 if (!is_good_name(parg->name)) {
1636 if (traceprobe_conflict_field_name(parg->name, tp->args, i)) {
1642 return traceprobe_parse_probe_arg_body(body, &tp->size, parg, ctx);
1899 struct probe_arg *parg;
1925 parg = tp->args + i;
1926 pos += snprintf(buf + pos, LEN_OR_ZERO, " %s=", parg->name);
1927 if (parg->count) {
1929 parg->type->fmt);
1930 for (j = 1; j < parg->count; j++)
1932 parg->type->fmt);
1936 parg->type->fmt);
1942 parg = tp->args + i;
1943 if (parg->count) {
1944 if (parg->type->is_string)
1948 for (j = 0; j < parg->count; j++)
1950 fmt, parg->name, j);
1952 if (parg->type->is_string)
1957 fmt, parg->name);
1992 struct probe_arg *parg = &tp->args[i];
1993 const char *fmt = parg->type->fmttype;
1994 int size = parg->type->size;
1996 if (parg->fmt)
1997 fmt = parg->fmt;
1998 if (parg->count)
1999 size *= parg->count;
2000 ret = trace_define_field(event_call, fmt, parg->name,
2001 offset + parg->offset, size,
2002 parg->type->is_signed,