[llvm] BPF: Use DebugLoc to find Filename for BTF line info (PR #90302)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 00:30:36 PDT 2024
eddyz87 wrote:
@yonghong-song, I've updated the [script](https://gist.github.com/eddyz87/807e7c3b8707ae042c0fcccfe6f09938) to use `llvm-objdump` binary to extract BTF/BTF.ext section contents. I've also switched to using your branch `dev2` instead of `dev`. After these changes I do see some changes in new vs old generated line info, it could be summarized as followos:
- line info with line 0 is not generated anymore;
- this causes removal of a few (~400) line infos in cases like below:
```diff
Insn File Line Col
...
1968 bpf_cubic.c 359 17 delta = (cwnd * scale) >> 3;
1984 bpf_cubic.c 360 27 if (ca->ack_cnt > delta && delta) {
-1992 bpf_cubic.c 0 0 (anon)
-2008 bpf_cubic.c 360 27 if (ca->ack_cnt > delta && delta) {
```
The record for instruction 2008 is removed, because it's coordinate is identical to record for instruction 1984.
=> I think that it is safe to merge this patch.
https://github.com/llvm/llvm-project/pull/90302
More information about the llvm-commits
mailing list