perf probe and bitfields
Hi Arnaldo / Masami:
Are there known issues / limitations with perf probe and bitfields?
Here's an example: pkt_type is a bitfield in sk_buff. When I put a probe in arp_rcv to examine the pkt_type value:
$ perf probe 'arp_rcv ptype=skb->pkt_type dev=dev->name:string'
I only get '0' output:
$ perf script
vhost-27472 27483 [013] 4313207.619714: probe:arp_rcv:
(ffffffff815653b0) ptype=0 dev="br1"
vhost-27472 27483 [013] 4313207.619763: probe:arp_rcv:
(ffffffff815653b0) ptype=0 dev="br1"
vhost-27472 27483 [013] 4313210.588990: probe:arp_rcv:
(ffffffff815653b0) ptype=0 dev="br1"when I know broadcast packet are getting handled (pkt_type == PACKET_BROADCAST). This is confirmed by adding a printk to arp_rcv.
Thanks,
David
Hi David,
Quoted 8 lines · David Ahern
Hi Arnaldo / Masami:
Are there known issues / limitations with perf probe and bitfields?
Here's an example:
pkt_typeis a bitfield insk_buff. When I put a probe inarp_rcvto examine thepkt_typevalue:$ perf probe 'arp_rcv ptype=skb->pkt_type dev=dev->name:string'
Bitfield type takes 3 parameters according to the Doc/perf-probe.txt. Maybe it's like 'ptype=skb->pkt_type:b3@0/8' ?
Thanks,
Namhyung
Quoted 20 lines
I only get '0' output:
$ perf script vhost-27472 27483 [013] 4313207.619714: probe:arp_rcv: (ffffffff815653b0) ptype=0 dev="br1" vhost-27472 27483 [013] 4313207.619763: probe:arp_rcv: (ffffffff815653b0) ptype=0 dev="br1" vhost-27472 27483 [013] 4313210.588990: probe:arp_rcv: (ffffffff815653b0) ptype=0 dev="br1"when I know broadcast packet are getting handled (
pkt_type==PACKET_BROADCAST). This is confirmed by adding a printk toarp_rcv.Thanks,
David
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Namhyung Kim
Hi David,
Quoted 4 lines · David Ahern
Hi Arnaldo / Masami:
Are there known issues / limitations with perf probe and bitfields?
Quoted 7 lines
Quoted 4 lines
Here's an example:
pkt_typeis a bitfield insk_buff. When I put a probe inarp_rcvto examine thepkt_typevalue:$ perf probe 'arp_rcv ptype=skb->pkt_type dev=dev->name:string'Bitfield type takes 3 parameters according to the
Doc/perf-probe.txt. Maybe it's like 'ptype=skb->pkt_type:b3@0/8' ?
missed that. Thanks, Namyhung.
Quoted 11 lines · On Fri, 26 Jan 2018 09:28:49 -0700 David Ahern <[email protected]> wrote:
Quoted 10 lines · Namhyung Kim
Hi David,
Quoted 7 lines · David Ahern
Hi Arnaldo / Masami:
Are there known issues / limitations with perf probe and bitfields?
Here's an example:
pkt_typeis a bitfield insk_buff. When I put a probe inarp_rcvto examine thepkt_typevalue:
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
$ perf probe 'arp_rcv ptype=skb->pkt_type dev=dev->name:string'Bitfield type takes 3 parameters according to the
Doc/perf-probe.txt. Maybe it's like 'ptype=skb->pkt_type:b3@0/8' ?missed that. Thanks, Namyhung.
Hmm, if you have debuginfo, it must be automatically translated. E.g.
$ sudo perf probe -D "arp_rcv ptype=skb->pkt_type dev=dev->name:string" p:probe/arp_rcv _text+8135904 ptype=+144(%di):b3@5/8 dev=+0(%si):string
So as you can see the ptype automatically has ":b3@5/8" types.
Thanks,
Signature · 1 line
Masami Hiramatsu
Quoted 23 lines · Masami Hiramatsu
Quoted 11 lines · On Fri, 26 Jan 2018 09:28:49 -0700 David Ahern <[email protected]> wrote:
Quoted 10 lines · Namhyung Kim
Hi David,
Quoted 7 lines · David Ahern
Hi Arnaldo / Masami:
Are there known issues / limitations with perf probe and bitfields?
Here's an example:
pkt_typeis a bitfield insk_buff. When I put a probe inarp_rcvto examine thepkt_typevalue:Quoted 6 lines
Quoted 4 lines
Quoted 1 line
$ perf probe 'arp_rcv ptype=skb->pkt_type dev=dev->name:string'Bitfield type takes 3 parameters according to the
Doc/perf-probe.txt. Maybe it's like 'ptype=skb->pkt_type:b3@0/8' ?missed that. Thanks, Namyhung.
Quoted 7 lines
Hmm, if you have debuginfo, it must be automatically translated. E.g.
$ sudo perf probe -D "arp_rcv ptype=skb->pkt_type dev=dev->name:string" p:probe/arp_rcv _text+8135904 ptype=+144(%di):b3@5/8 dev=+0(%si):stringSo as you can see the ptype automatically has ":b3@5/8" types.
I was expecting it to automatically figure that out. The kernels in question were custom built and the vmlinux must not have been available.
Thanks the tip.