diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2024-10-24 17:37:41 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-03 09:02:32 -0800 |
commit | a8f80673ca0daaad990882529a5b4dc5114071e7 (patch) | |
tree | 86fe2293ba8a0b0ec09a95748f5a77d63a688344 /drivers/net/dsa/dsa_loop.c | |
parent | f07a6e6ceb054001888e101d74036633e2aa1020 (diff) |
compiler_types: Add noinline_for_tracing annotation
Kernel functions that are not inlined can be easily hooked with BPF for
tracing. However, functions intended for tracing may still be inlined
unexpectedly. For example, in our case, after upgrading the compiler from
GCC 9 to GCC 11, the tcp_drop_reason() function was inlined, which broke
our monitoring tools. To prevent this, we need to ensure that the function
remains non-inlined.
The noinline_for_tracing annotation is introduced as a general solution for
preventing inlining of kernel functions that need to be traced. This
approach avoids the need for adding individual noinline comments to each
function and provides a more consistent way to maintain traceability.
Link: https://lore.kernel.org/netdev/CANn89iKvr44ipuRYFaPTpzwz=B_+pgA94jsggQ946mjwreV6Aw@mail.gmail.com/
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://patch.msgid.link/20241024093742.87681-2-laoar.shao@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
0 files changed, 0 insertions, 0 deletions