Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As of libbpf-rs 0.23.0 (which contains commit libbpf/libbpf-rs@9d9e979), libbpf-rs now generates rust structs that honor padding. We can therefore remove the custom padding in scx_rusty's struct pcpu_ctx. For example, here is the generated pub struct pcpu_ctx: pub struct pcpu_ctx { pub dom_rr_cur: u32, pub dom_id: u32, pub nr_node_doms: u32, pub node_doms: [u32; 64], pub __pad_268: [u8; 52], } And here is the matching struct in the BPF object file: struct pcpu_ctx { u32 dom_rr_cur; /* 0 4 */ u32 dom_id; /* 4 4 */ u32 nr_node_doms; /* 8 4 */ u32 node_doms[64]; /* 12 256 */ /* size: 320, cachelines: 5, members: 4 */ /* padding: 52 */ } __attribute__((__aligned__(64))); Signed-off-by: David Vernet <void@manifault.com>
- Loading branch information