Commit f2aa7e5
ftrace,bpf: Remove FTRACE_OPS_FL_JMP ftrace_ops flag
At the moment the we allow the jmp attach only for ftrace_ops that
has FTRACE_OPS_FL_JMP set. This conflicts with following changes
where we use single ftrace_ops object for all direct call sites,
so all could be be attached via just call or jmp.
We already limit the jmp attach support with config option and bit
(LSB) set on the trampoline address. It turns out that's actually
enough to limit the jmp attach for architecture and only for chosen
addresses (with LSB bit set).
Each user of register_ftrace_direct or modify_ftrace_direct can set
the trampoline bit (LSB) to indicate it has to be attached by jmp.
The bpf trampoline generation code uses trampoline flags to generate
jmp-attach specific code and ftrace inner code uses the trampoline
bit (LSB) to handle return from jmp attachment, so there's no harm
to remove the FTRACE_OPS_FL_JMP bit.
The fexit/fmodret performance stays the same (did not drop),
current code:
fentry : 77.904 ± 0.546M/s
fexit : 62.430 ± 0.554M/s
fmodret : 66.503 ± 0.902M/s
with this change:
fentry : 80.472 ± 0.061M/s
fexit : 63.995 ± 0.127M/s
fmodret : 67.362 ± 0.175M/s
Fixes: 25e4e35 ("ftrace: Introduce FTRACE_OPS_FL_JMP")
Signed-off-by: Jiri Olsa <[email protected]>1 parent 037d2fc commit f2aa7e5
3 files changed
+14
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
217 | 222 | | |
218 | | - | |
| 223 | + | |
219 | 224 | | |
220 | | - | |
| 225 | + | |
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| |||
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
246 | | - | |
| 256 | + | |
247 | 257 | | |
248 | 258 | | |
249 | 259 | | |
| |||
499 | 509 | | |
500 | 510 | | |
501 | 511 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | 512 | | |
510 | 513 | | |
511 | 514 | | |
| |||
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
536 | | - | |
| 539 | + | |
537 | 540 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | 541 | | |
546 | 542 | | |
547 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6017 | 6017 | | |
6018 | 6018 | | |
6019 | 6019 | | |
6020 | | - | |
6021 | | - | |
6022 | | - | |
6023 | | - | |
6024 | 6020 | | |
6025 | 6021 | | |
6026 | | - | |
6027 | | - | |
6028 | | - | |
6029 | 6022 | | |
6030 | 6023 | | |
6031 | 6024 | | |
| |||
6146 | 6139 | | |
6147 | 6140 | | |
6148 | 6141 | | |
6149 | | - | |
6150 | | - | |
6151 | | - | |
6152 | | - | |
6153 | | - | |
6154 | | - | |
6155 | | - | |
6156 | 6142 | | |
6157 | 6143 | | |
6158 | 6144 | | |
| |||
0 commit comments