diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-03-31 18:06:34 -0300 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-03-31 20:23:06 -0700 |
| commit | 7f8969aa739da4d2096f2e6f87e030de6efad9dc (patch) | |
| tree | 519e0ebfa9a56566dacb22b53ee812b2c19ace42 /tools/perf/trace | |
| parent | a8e11416ffdcddb3bb3adb265f10b67591d21de8 (diff) | |
perf beauty: Move copy of fadvise.h from tools/include/ to tools/perf/trace/beauty/include/
As it is not really used when compiling anything, just being parsed to
collect number->string tables for 'perf trace'.
$ git grep fadvise.h tools/
tools/perf/Makefile.perf:$(fadvise_advice_array): $(beauty_uapi_linux_dir)/fadvise.h $(fadvise_advice_tbl)
tools/perf/check-headers.sh: "include/uapi/linux/fadvise.h"
tools/perf/trace/beauty/fadvise.sh:grep -E $regex ${header_dir}/fadvise.h | \
tools/perf/trace/beauty/fadvise.sh:# tools/include/uapi/linux/fadvise.h for details.
$
Link: https://lore.kernel.org/r/CAP-5=fVBNQVF8k3JUQjH1nkP69ZVp8BqP+uwygcx=xO0zC4xrg@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/trace')
| -rwxr-xr-x | tools/perf/trace/beauty/fadvise.sh | 2 | ||||
| -rw-r--r-- | tools/perf/trace/beauty/include/uapi/linux/fadvise.h | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/tools/perf/trace/beauty/fadvise.sh b/tools/perf/trace/beauty/fadvise.sh index 4d3dd6e56ded..e9857112fa51 100755 --- a/tools/perf/trace/beauty/fadvise.sh +++ b/tools/perf/trace/beauty/fadvise.sh @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 -[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ +[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/perf/trace/beauty/include/uapi/linux/ printf "static const char *fadvise_advices[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+POSIX_FADV_(\w+)[[:space:]]+([[:digit:]]+)[[:space:]]+.*' diff --git a/tools/perf/trace/beauty/include/uapi/linux/fadvise.h b/tools/perf/trace/beauty/include/uapi/linux/fadvise.h new file mode 100644 index 000000000000..0862b87434c2 --- /dev/null +++ b/tools/perf/trace/beauty/include/uapi/linux/fadvise.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef FADVISE_H_INCLUDED +#define FADVISE_H_INCLUDED + +#define POSIX_FADV_NORMAL 0 /* No further special treatment. */ +#define POSIX_FADV_RANDOM 1 /* Expect random page references. */ +#define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ +#define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ + +/* + * The advise values for POSIX_FADV_DONTNEED and POSIX_ADV_NOREUSE + * for s390-64 differ from the values for the rest of the world. + */ +#if defined(__s390x__) +#define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ +#define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +#else +#define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +#define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif + +#endif /* FADVISE_H_INCLUDED */ |
