Better debugging information for inlined kernel functions

Modern compilers perform a lot of optimizations, which can complicate debugging. Song Liu and Thierry Treyer spoke about a potential improvement to BPF Type Format (BTF) debugging information that could partially combat that problem at the 2025 Linux Storage, Filesystem, Memory-Management, and BPF Summit. They want to add information on selectively inlined functions to BTF in order to better support tracing tools. Treyer participated remotely.
现代编译器会执行大量优化操作,这使得调试变得更加复杂。Song Liu 和 Thierry Treyer 在 2025 年的 Linux 存储、文件系统、内存管理和 BPF 峰会上探讨了一种对 BPF 类型格式(BTF)调试信息的潜在改进,以在一定程度上缓解这一问题。他们希望将“选择性内联函数”的信息添加到 BTF 中,以更好地支持跟踪工具。Treyer 是远程参与的。

One of the most common compiler optimizations is inlining, which embeds the code of a function directly into its caller, avoiding the overhead of a function call and potentially exposing other hidden optimization opportunities. Modern compilers don't always inline every call to a particular function that would benefit from inlining, however. The compiler uses heuristics to decide which call sites will benefit from inlining. This means that a programmer can easily end up with a situation where a function still appears in a binary's symbol table (because some calls were not inlined), but tracing that function won't show calls to it (because the hot calls were inlined, and therefore the function's symbol no longer referrs to them).
最常见的编译器优化之一是函数内联:将函数体的代码直接嵌入调用者中,以避免函数调用的开销,并可能带来更多的优化机会。然而,现代编译器并不会内联所有调用某个函数的地方。编译器会使用启发式规则来决定哪些调用点适合内联。这就可能导致一种情况:一个函数仍然出现在二进制文件的符号表中(因为部分调用未被内联),但在跟踪时却无法看到调用它的地方(因为热点调用已被内联,该函数符号不再代表这些调用)。

That is

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mounter625

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值