Re: [PATCH 4/5] perf trace: Beautify the 'flags' arg of unlinkat

From: Ian Rogers
Date: Wed Mar 20 2024 - 21:51:03 EST


On Wed, Mar 20, 2024 at 12:31 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> Reusing the fs_at_flags array done for the 'stat' syscall.
>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: Ian Rogers <irogers@xxxxxxxxxx>
> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
> Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>

Thanks,
Ian

> ---
> tools/perf/builtin-trace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
> index 58546e8af9fcf481..ef0dfffd99fdf3cc 100644
> --- a/tools/perf/builtin-trace.c
> +++ b/tools/perf/builtin-trace.c
> @@ -1171,7 +1171,9 @@ static const struct syscall_fmt syscall_fmts[] = {
> .arg = { [0] = { .scnprintf = SCA_FILENAME, /* name */ }, }, },
> { .name = "uname", .alias = "newuname", },
> { .name = "unlinkat",
> - .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
> + .arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
> + [1] = { .scnprintf = SCA_FILENAME, /* pathname */ },
> + [2] = { .scnprintf = SCA_FS_AT_FLAGS, /* flags */ }, }, },
> { .name = "utimensat",
> .arg = { [0] = { .scnprintf = SCA_FDAT, /* dirfd */ }, }, },
> { .name = "wait4", .errpid = true,
> --
> 2.44.0
>