From d2994d13cd71bf74a5b1e8ce396ec4b6afd80db2 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Sun, 8 Feb 2026 10:25:18 +0100 Subject: [PATCH] lib: Emit nop,no5 instructions combo for x86_64 arch Now that we have no5 optimization support in kernel, let's emit nop,nop5 for usdt probe. We leave it up to the library to use desirable nop instruction. Signed-off-by: Jiri Olsa --- usdt.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usdt.h b/usdt.h index 549d1f7..c71e21d 100644 --- a/usdt.h +++ b/usdt.h @@ -312,6 +312,8 @@ struct usdt_sema { volatile unsigned short active; }; #ifndef USDT_NOP #if defined(__ia64__) || defined(__s390__) || defined(__s390x__) #define USDT_NOP nop 0 +#elif defined(__x86_64__) +#define USDT_NOP .byte 0x90, 0x0f, 0x1f, 0x44, 0x00, 0x0 /* nop, nop5 */ #else #define USDT_NOP nop #endif