[PATCH] D53736: [BTF] Add BTF DebugInfo

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 00:33:27 PST 2018


MaskRay added a comment.

Sorry for my slow response. Since this revision proposes to extend the currently supported debug info formats from 2 to 3 (hope I didn't get it wrong), this comes with code size increase and greater maintenance cost (people have to ensure the 3 debug formats continue working when they make changes to the common interface), so please be a bit patient for the slower review process:)
I find that there hasn't been actual discussion on the mailing list https://lists.llvm.org/pipermail/llvm-dev/2018-November/127953.html What about making a follow-up to remind people of that RFC? http://llvmweekly.org/ is also a great place to attract more attention.

Since you are proposing a format similar to CTF (Compact C Type Format), which is used by dtrace. Users on the platforms supporting dtrace may shed some light: Solaris, Mac OS X (since 10.5), FreeBSD (2008), NetBSD (2010), OpenBSD (ongoing since 2016). ctfconvert ctfmerge ctfdump are tools used widely by dtrace but it doesn't seem they need direct support from the compiler.

I'm still learning these stuff to understand better about the whole picture.

> Note that dwarf sections are still generated as dwarf is used by user space tools like llvm-objdump etc. for BPF target.

If it is the case, it seems there is no size benefit of object files. I also wonder if https://facebookmicrosites.github.io/bpf/blog/2018/11/14/btf-enhancement.html is related to this revision. That article compares the sizes of BTF and DWARF.
BTF type descriptors does not seem to improve much compared with DWARF, but the deduplicated result is impressive (137x reduction).
I am not an expert on DWARF but I have a feeling that we can probably get a similar reduction rate by leveraging a similar deduplication technique. (For the pass 2 mentioned in that article I think it is a form of DFA minimalization)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53736/new/

https://reviews.llvm.org/D53736





More information about the llvm-commits mailing list