[PATCH 2/3] perf trace: Copy uapi/linux/eventfd.h for beautifier

From: Namhyung Kim

Date: Sun May 24 2026 - 21:17:09 EST


To make sure perf trace will see the latest definitions.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/check-headers.sh | 1 +
tools/perf/trace/beauty/eventfd.c | 12 +-----------
tools/perf/trace/beauty/include/uapi/linux/eventfd.h | 11 +++++++++++
3 files changed, 13 insertions(+), 11 deletions(-)
create mode 100644 tools/perf/trace/beauty/include/uapi/linux/eventfd.h

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 531c0e0e84dfa101..24660b2bd45e971f 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -90,6 +90,7 @@ declare -a BEAUTY_FILES=(
"include/uapi/drm/drm.h"
"include/uapi/drm/i915_drm.h"
"include/linux/socket.h"
+ "include/uapi/linux/eventfd.h"
"include/uapi/linux/fadvise.h"
"include/uapi/linux/fcntl.h"
"include/uapi/linux/fs.h"
diff --git a/tools/perf/trace/beauty/eventfd.c b/tools/perf/trace/beauty/eventfd.c
index 18b661282834b7d9..830a5b7ae455f157 100644
--- a/tools/perf/trace/beauty/eventfd.c
+++ b/tools/perf/trace/beauty/eventfd.c
@@ -1,17 +1,7 @@
// SPDX-License-Identifier: LGPL-2.1
#include "trace/beauty/beauty.h"
+#include "trace/beauty/include/uapi/linux/eventfd.h"

-#ifndef EFD_SEMAPHORE
-#define EFD_SEMAPHORE 1
-#endif
-
-#ifndef EFD_NONBLOCK
-#define EFD_NONBLOCK 00004000
-#endif
-
-#ifndef EFD_CLOEXEC
-#define EFD_CLOEXEC 02000000
-#endif

size_t syscall_arg__scnprintf_eventfd_flags(char *bf, size_t size, struct syscall_arg *arg)
{
diff --git a/tools/perf/trace/beauty/include/uapi/linux/eventfd.h b/tools/perf/trace/beauty/include/uapi/linux/eventfd.h
new file mode 100644
index 0000000000000000..2eb9ab6c32f30502
--- /dev/null
+++ b/tools/perf/trace/beauty/include/uapi/linux/eventfd.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_LINUX_EVENTFD_H
+#define _UAPI_LINUX_EVENTFD_H
+
+#include <linux/fcntl.h>
+
+#define EFD_SEMAPHORE (1 << 0)
+#define EFD_CLOEXEC O_CLOEXEC
+#define EFD_NONBLOCK O_NONBLOCK
+
+#endif /* _UAPI_LINUX_EVENTFD_H */
--
2.54.0.746.g67dd491aae-goog