diff options
Diffstat (limited to 'tools/perf/builtin-trace.c')
| -rw-r--r-- | tools/perf/builtin-trace.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index c607f39b8c8b..baee1f695600 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -2005,7 +2005,9 @@ static int trace__symbols_init(struct trace *trace, int argc, const char **argv, err = __machine__synthesize_threads(trace->host, &trace->tool, &trace->opts.target, evlist->core.threads, trace__tool_process, - true, false, 1); + /*needs_mmap=*/callchain_param.enabled, + /*mmap_data=*/false, + /*nr_threads_synthesize=*/1); out: if (err) { perf_env__exit(&trace->host_env); @@ -2067,6 +2069,15 @@ static const struct syscall_arg_fmt *syscall_arg_fmt__find_by_name(const char *n return __syscall_arg_fmt__find_by_name(syscall_arg_fmts__by_name, nmemb, name); } +/* + * v6.19 kernel added new fields to read userspace memory for event tracing. + * But it's not used by perf and confuses the syscall parameters. + */ +static bool is_internal_field(struct tep_format_field *field) +{ + return !strcmp(field->type, "__data_loc char[]"); +} + static struct tep_format_field * syscall_arg_fmt__init_array(struct syscall_arg_fmt *arg, struct tep_format_field *field, bool *use_btf) @@ -2075,6 +2086,10 @@ syscall_arg_fmt__init_array(struct syscall_arg_fmt *arg, struct tep_format_field int len; for (; field; field = field->next, ++arg) { + /* assume it's the last argument */ + if (is_internal_field(field)) + continue; + last_field = field; if (arg->scnprintf) @@ -2143,6 +2158,7 @@ static int syscall__read_info(struct syscall *sc, struct trace *trace) { char tp_name[128]; const char *name; + struct tep_format_field *field; int err; if (sc->nonexistent) @@ -2199,6 +2215,13 @@ static int syscall__read_info(struct syscall *sc, struct trace *trace) --sc->nr_args; } + field = sc->args; + while (field) { + if (is_internal_field(field)) + --sc->nr_args; + field = field->next; + } + sc->is_exit = !strcmp(name, "exit_group") || !strcmp(name, "exit"); sc->is_open = !strcmp(name, "open") || !strcmp(name, "openat"); |
