Re: [PATCHv4 0/3] pahole/kernel: Workaround dwarf bug for function encoding

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

 



Em Mon, Nov 09, 2020 at 02:29:11PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Nov 06, 2020 at 02:56:45PM -0800, Andrii Nakryiko escreveu:
> > On Fri, Nov 6, 2020 at 2:25 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>  
> > For the series:
>  
> > Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> 
> Thanks, applied, testing now.

Now we have:

$ pfunct -F btf /sys/kernel/btf/vmlinux  | wc -l
38816
$ pfunct -F btf /sys/kernel/btf/vmlinux  | head
get_e820_md5
relocate_restore_code
resume_play_dead
bsp_pm_callback
msr_initialize_bdw
msr_save_cpuid_features
pm_check_save_msr
amd_bus_cpu_online
update_res
pci_read
$

$ pfunct -F btf /sys/kernel/btf/vmlinux -f msr_save_cpuid_features
int msr_save_cpuid_features(const struct x86_cpu_id  * c);
$
$ pfunct -F btf /sys/kernel/btf/vmlinux -f tcp_v4_rcv
int tcp_v4_rcv(struct sk_buff * skb);
$

[acme@five ~]$ pfunct -F btf /sys/kernel/btf/vmlinux --class=sk_buff | head
pskb_expand_head
skb_put
audit_list_rules_send
netlink_ack
consume_skb
skb_queue_head
skb_queue_tail
netlink_broadcast
__nlmsg_put
kfree_skb
[acme@five ~]$ pfunct -F btf /sys/kernel/btf/vmlinux -f audit_list_rules_send
int audit_list_rules_send(struct sk_buff * request_skb, int seq);
[acme@five ~]$ pfunct -F btf /sys/kernel/btf/vmlinux -f netlink_broadcast
int netlink_broadcast(struct sock * ssk, struct sk_buff * skb, __u32 portid, __u32 group, gfp_t allocation);
[acme@five ~]$

Seems to work :-)

In a future version I'll make it work with btf and
/sys/kernel/btf/vmlinux by default if only function names are provided,
like pahole with types:

[acme@five ~]$ pahole sk_buff_head
struct sk_buff_head {
	struct sk_buff *           next;                 /*     0     8 */
	struct sk_buff *           prev;                 /*     8     8 */
	__u32                      qlen;                 /*    16     4 */
	spinlock_t                 lock;                 /*    20     4 */

	/* size: 24, cachelines: 1, members: 4 */
	/* last cacheline: 24 bytes */
};
[acme@five ~]$ pahole list_head
struct list_head {
	struct list_head *         next;                 /*     0     8 */
	struct list_head *         prev;                 /*     8     8 */

	/* size: 16, cachelines: 1, members: 2 */
	/* last cacheline: 16 bytes */
};
[acme@five ~]$

Pushed out.

- Arnaldo



[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