Re: [PATCH] bpftool: Allow to read btf as raw data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Oct 2019 22:03:51 +0200, Jiri Olsa wrote:
> On Fri, Oct 25, 2019 at 11:39:01AM -0700, Jakub Kicinski wrote:
> > On Thu, 24 Oct 2019 15:30:25 +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
> > >   [1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none)
> > >   [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
> > >   [3] CONST '(anon)' type_id=2
> > > 
> > > Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>  
> > 
> > Acked-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>  
> 
> [root@ibm-z-107 bpftool]# ./bpftool btf dump file /sys/kernel/btf/vmlinux  | head -3
> [1] INT '(anon)' size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [2] INT 'long unsigned int' size=8 bits_offset=0 nr_bits=64 encoding=(none)
> [3] CONST '(anon)' type_id=2
> [root@ibm-z-107 bpftool]# lscpu | grep Endian
> Byte Order:          Big Endian

Thanks for checking! I thought the on-disk format is fixed like the
ELF magic number. But if two bads make a right then all is good ☺️




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux