Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pahole wanted features & bugfixes #1096

Open
5 of 7 tasks
ojeda opened this issue Aug 9, 2024 · 0 comments
Open
5 of 7 tasks

pahole wanted features & bugfixes #1096

ojeda opened this issue Aug 9, 2024 · 0 comments
Labels
meta Meta issue. • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...

Comments

@ojeda
Copy link
Member

ojeda commented Aug 9, 2024

Note: see as well the pahole Rust cases: https://github.com/Rust-for-Linux/pahole-rust-cases.

Features that we would like to see

Required (we almost certainly want them)

  • Support DW_TAG_variant_part.

    • Currently it is the last warning for Rust build, with:
      ⬢[acme@toolbox linux]$ pahole -C '<kernel::str::RawFormatter as core::fmt::Write>::{vtable_type}' ../build/rust-kernel/rust/kernel.o
      die__process_class: tag not supported 0x33 (variant_part) at <14f43>!
      struct <kernel::str::RawFormatter as core::fmt::Write>::{vtable_type} {
              () *                       drop_in_place __attribute__((__aligned__(8))); /*     0     8 */
              usize                      size __attribute__((__aligned__(8))); /*     8     8 */
              usize                      align __attribute__((__aligned__(8))); /*    16     8 */
              () *                       __method3 __attribute__((__aligned__(8))); /*    24     8 */
              () *                       __method4 __attribute__((__aligned__(8))); /*    32     8 */
              () *                       __method5 __attribute__((__aligned__(8))); /*    40     8 */
             /* size: 48, cachelines: 1, members: 6 */
              /* forced alignments: 6 */
              /* last cacheline: 48 bytes */
      } __attribute__((__aligned__(8)));
    • acmel/dwarves@2e8cd6a ("dwarf_loader: Ignore DW_TAG_variant_part for now to fix a segfault") (v1.18).
  • Support BTF for Rust.

    • acmel/dwarves@431df45 ("btfdiff: Exclude Rust CUs since those are not yet being converted to BTF on the Linux kernel") (v1.25).

Nice to have (not critical, we could workaround if needed, etc.)

Low priority (we will likely not use them in the end)

Done (stabilized, fixed, not needed anymore, etc.)

  • Do --lang_exclude CU filtering earlier.

  • Support DW_TAG_template_type_param.

  • Support reordering of fields.

    • i.e. avoid assuming structs fields are in order, since Rust's default representation reorders them.
    • acmel/dwarves@c4eb189 ("core: Check that we're adding DW_TAG_member sorted by byte offset") (v1.25).
  • Support --lang and --lang_exclude.

    • Used by: commit c117797 ("btf, scripts: Exclude Rust CUs with pahole").
    • acmel/dwarves@8ee3637 ("pahole: Introduce --lang to ask for only compilation units written in some languages") (v1.24).
    • acmel/dwarves@49358df ("pahole: Add --lang_exclude to allow skipping compilation units written in some languages") (v1.24).

Bugs that we would like to see fixed

Required (we almost certainly want them)

Nice to have (probably not critical, we could workaround if needed, etc.)

Low priority (we will likely not use them in the end)

Done (stabilized, fixed, or not needed anymore, etc.)

  • Fix sorting of Rust structs.
@ojeda ojeda added • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy... meta Meta issue. labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Meta issue. • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...
Development

No branches or pull requests

1 participant