summaryrefslogtreecommitdiffstats
path: root/samples/bpf/offwaketime_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/offwaketime_kern.c')
-rw-r--r--samples/bpf/offwaketime_kern.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/samples/bpf/offwaketime_kern.c b/samples/bpf/offwaketime_kern.c
index d459f73412a4..e74ee1cd4b9c 100644
--- a/samples/bpf/offwaketime_kern.c
+++ b/samples/bpf/offwaketime_kern.c
@@ -12,7 +12,12 @@
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
-#define _(P) ({typeof(P) val; bpf_probe_read(&val, sizeof(val), &P); val;})
+#define _(P) \
+ ({ \
+ typeof(P) val; \
+ bpf_probe_read_kernel(&val, sizeof(val), &(P)); \
+ val; \
+ })
#define MINBLOCK_US 1