Em Thu, Feb 14, 2019 at 09:47:57AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Feb 13, 2019 at 09:43:43PM -0800, Andrii Nakryiko escreveu: > > happy with it. So consider this email a solicitation for naming > > suggestion. Keep in mind, that all the pahole's functions of the form > > btf__xxx will be renamed as well for consistency. If you like > > btf_info, let me know as well, I'll just stick with it. > Can you try thinking if splitting this further into 'struct btf_loader', > 'struct btf_encoder' that would live in the pahole sources and that > refer to a 'struct btf' that lives in libbpf (or in libbtf, at some > point) is a move that eases your current needs? So, the btf__new() in tools/lib/bpf/btf.c is basically a variant of btf__new() in the pahole sources, probably we should go ahead and make pahole use that btf__new() and do changes in tools/lib/bpf/btf.c to allow for it to access internal state that it needs to do its job? I'm tinkering a bit with it. - Arnaldo