On Mon, 21 Oct 2019 16:02:27 +0200, Jiri Olsa wrote:
> > > static int do_dump(int argc, char **argv)
> > > {
> > > struct btf *btf = NULL;
> > > @@ -397,7 +429,7 @@ static int do_dump(int argc, char **argv)
> > > __u32 btf_id = -1;
> > > const char *src;
> > > int fd = -1;
> > > - int err
On Fri, Oct 18, 2019 at 03:39:05PM -0700, Jakub Kicinski wrote:
> On Fri, 18 Oct 2019 12:34:04 +0200, Jiri Olsa wrote:
> > The bpftool interface stays the same, but now it's possible
> > to run it over BTF raw data, like:
> >
> > $ bpftool btf dump file /sys/kernel/btf/vmlinux
> > libbpf: fail
On Fri, Oct 18, 2019 at 08:04:44PM +, Yonghong Song wrote:
SNIP
> >> + FILE *f;
> >> +
> >> + if (stat(file, &st))
> >> + return btf;
> >> +
> >> + f = fopen(file, "rb");
> >> + if (!f)
> >> + return btf;
> >> +
> >> + buf = malloc(st.st_size);
> >> + if (!buf)
> >> +
On Fri, Oct 18, 2019 at 04:48:25PM +, Andrii Nakryiko wrote:
> On 10/18/19 3:34 AM, Jiri Olsa wrote:
> > The bpftool interface stays the same, but now it's possible
> > to run it over BTF raw data, like:
>
> Oh, great, I had similar patch laying around for a while, never got to
> cleaning it
On Fri, 18 Oct 2019 12:34:04 +0200, Jiri Olsa wrote:
> The bpftool interface stays the same, but now it's possible
> to run it over BTF raw data, like:
>
> $ bpftool btf dump file /sys/kernel/btf/vmlinux
> libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux
> [1] INT '(anon)' size=4 bits
On 10/18/19 9:48 AM, Andrii Nakryiko wrote:
> On 10/18/19 3:34 AM, Jiri Olsa wrote:
>> The bpftool interface stays the same, but now it's possible
>> to run it over BTF raw data, like:
>
> Oh, great, I had similar patch laying around for a while, never got to
> cleaning it up, though, so thanks
On 10/18/19 3:34 AM, Jiri Olsa wrote:
> The bpftool interface stays the same, but now it's possible
> to run it over BTF raw data, like:
Oh, great, I had similar patch laying around for a while, never got to
cleaning it up, though, so thanks for picking this up!
>
>$ bpftool btf dump file /
The bpftool interface stays the same, but now it's possible
to run it over BTF raw data, like:
$ bpftool btf dump file /sys/kernel/btf/vmlinux
libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux
[1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none)
[2] INT 'long unsigned int