Commit 27607b8
committed
examples/c: prevent uprobe_add/uprobe_sub inlining
Depending on compiler, uprobe_add/uprobe_sub can still be inlined. Use
no-op volatile asm and noinline attribute to prevent compiler from
inlining. Just global function is not enough.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>1 parent 23f3b6e commit 27607b8
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
| 25 | + | |
22 | 26 | | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
0 commit comments