Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 1437a9f

Browse files
committed
tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY
There is no scrape script yet for those, but the warning pointed out we need to update the array with the F_LINUX_SPECIFIC_BASE entries, do it. Now 'perf trace' can decode that cmd and also use it in filter, as in: root@number:~# perf trace -e syscalls:*enter_fcntl --filter 'cmd != SETFL && cmd != GETFL' 0.000 sssd_kcm/303828 syscalls:sys_enter_fcntl(fd: 13</var/lib/sss/secrets/secrets.ldb>, cmd: SETLK, arg: 0x7fffdc6a8a50) 0.013 sssd_kcm/303828 syscalls:sys_enter_fcntl(fd: 13</var/lib/sss/secrets/secrets.ldb>, cmd: SETLKW, arg: 0x7fffdc6a8aa0) 0.090 sssd_kcm/303828 syscalls:sys_enter_fcntl(fd: 13</var/lib/sss/secrets/secrets.ldb>, cmd: SETLKW, arg: 0x7fffdc6a88e0) ^Croot@number:~# This picks up the changes in: c62b758 ("fcntl: add F_DUPFD_QUERY fcntl()") Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Christian Brauner <brauner@kernel.org> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/ZlSqNQH9mFw2bmjq@x1 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 0efc88e commit 1437a9f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tools/perf/builtin-trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static const char *fcntl_cmds[] = {
765765
static DEFINE_STRARRAY(fcntl_cmds, "F_");
766766

767767
static const char *fcntl_linux_specific_cmds[] = {
768-
"SETLEASE", "GETLEASE", "NOTIFY", [5] = "CANCELLK", "DUPFD_CLOEXEC",
768+
"SETLEASE", "GETLEASE", "NOTIFY", "DUPFD_QUERY", [5] = "CANCELLK", "DUPFD_CLOEXEC",
769769
"SETPIPE_SZ", "GETPIPE_SZ", "ADD_SEALS", "GET_SEALS",
770770
"GET_RW_HINT", "SET_RW_HINT", "GET_FILE_RW_HINT", "SET_FILE_RW_HINT",
771771
};

tools/perf/trace/beauty/include/uapi/linux/fcntl.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
#define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
99
#define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
1010

11+
/*
12+
* Request nofications on a directory.
13+
* See below for events that may be notified.
14+
*/
15+
#define F_NOTIFY (F_LINUX_SPECIFIC_BASE + 2)
16+
17+
#define F_DUPFD_QUERY (F_LINUX_SPECIFIC_BASE + 3)
18+
1119
/*
1220
* Cancel a blocking posix lock; internal use only until we expose an
1321
* asynchronous lock api to userspace:
@@ -17,12 +25,6 @@
1725
/* Create a file descriptor with FD_CLOEXEC set. */
1826
#define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
1927

20-
/*
21-
* Request nofications on a directory.
22-
* See below for events that may be notified.
23-
*/
24-
#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
25-
2628
/*
2729
* Set and get of pipe page size array
2830
*/

0 commit comments

Comments
 (0)