From: David Ahern <dsahern@gmail.com>
To: Masami Hiramatsu <masami.hiramatsu@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Perf Users <linux-perf-users@vger.kernel.org>,
kernel-team@lge.com
Subject: Re: perf probe and bitfields
Date: Tue, 30 Jan 2018 09:53:19 -0700 [thread overview]
Message-ID: <2a2ba32f-2c71-d81d-252c-dffe0ca1c002@gmail.com> (raw)
In-Reply-To: <20180127140459.8e54eefcf9d74609cbcaa739@gmail.com>
On 1/26/18 10:04 PM, Masami Hiramatsu wrote:
> On Fri, 26 Jan 2018 09:28:49 -0700
> David Ahern <dsahern@gmail.com> wrote:
>
>> On 1/25/18 11:56 PM, Namhyung Kim wrote:
>>> Hi David,
>>>
>>> On Fri, Jan 19, 2018 at 08:43:50AM -0800, David Ahern wrote:
>>>> 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'
>>>
>>> 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.
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.
prev parent reply other threads:[~2018-01-30 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 16:43 perf probe and bitfields David Ahern
2018-01-26 6:56 ` Namhyung Kim
2018-01-26 16:28 ` David Ahern
2018-01-27 5:04 ` Masami Hiramatsu
2018-01-30 16:53 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a2ba32f-2c71-d81d-252c-dffe0ca1c002@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@kernel.org \
--cc=kernel-team@lge.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=masami.hiramatsu@gmail.com \
--cc=mhiramat@kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).