Alexei Starovoitov wrote: > When pahole converts dwarf to btf it emits only used types. > Wrap existing __bpf_trace_##template() function into > btf_trace_##template typedef and use it in type cast to > make gcc emits this type into dwarf. Then pahole will convert it to btf. > The "btf_trace_" prefix will be used to identify BTF enabled raw tracepoints. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> > --- FWIW I also have some cases where pahole gets padding wrong when converting dwarf to btf on older kernels. I'll try to get some more details and fix or get useful bug reports out next week. For now I work around them with some code on my side but can confuse tracing programs. Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>