aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf_helpers.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2020-08-20 23:12:37 +0000
committerAlexei Starovoitov <[email protected]>2020-08-21 22:40:22 +0000
commit819c23af561c4dc8c35faaacacdfa9ba81bacf5f (patch)
treeb51ad26cd794b10c8734826850d790caadb1b959 /tools/lib/bpf/bpf_helpers.h
parentlibbpf: Factor out common ELF operations and improve logging (diff)
downloadkernel-819c23af561c4dc8c35faaacacdfa9ba81bacf5f.tar.gz
kernel-819c23af561c4dc8c35faaacacdfa9ba81bacf5f.zip
libbpf: Add __noinline macro to bpf_helpers.h
__noinline is pretty frequently used, especially with BPF subprograms, so add them along the __always_inline, for user convenience and completeness. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/bpf_helpers.h')
-rw-r--r--tools/lib/bpf/bpf_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index e9a4ecddb7a5..1106777df00b 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -32,6 +32,9 @@
#ifndef __always_inline
#define __always_inline __attribute__((always_inline))
#endif
+#ifndef __noinline
+#define __noinline __attribute__((noinline))
+#endif
#ifndef __weak
#define __weak __attribute__((weak))
#endif