Re: perf script doesn't dump a normal call trace

From: Xin Long
Date: Sat Nov 03 2018 - 05:36:39 EST


On Fri, Nov 2, 2018 at 7:26 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> On Fri, Nov 02, 2018 at 03:36:13PM +0900, Xin Long wrote:
> > On upstream kernel(4.19) or RHEL-8 kernel(4.18.0):
> >
> > # perf record -e 'skb:consume_skb' -ag
> > ^C[ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.612 MB perf.data (634 samples) ]
> >
> > # perf script
> > swapper 0 [009] 274370.117711: skb:consume_skb: skbaddr=0xffff962c591d5b00
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > kworker/9:1-eve 926 [009] 274370.117729: skb:consume_skb:
> > skbaddr=0xffff962c591d5b00
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > kworker/9:1-eve 926 [009] 274370.117732: skb:consume_skb:
> > skbaddr=0xffff962c591d4900
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > swapper 0 [009] 274370.145528: skb:consume_skb: skbaddr=0xffff962c591d4900
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > kworker/9:1-eve 926 [009] 274370.145545: skb:consume_skb:
> > skbaddr=0xffff962c591d4900
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > kworker/9:1-eve 926 [009] 274370.145547: skb:consume_skb:
> > skbaddr=0xffff962c591d5b00
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
> >
> > swapper 0 [009] 274370.173443: skb:consume_skb: skbaddr=0xffff962c591d5b00
> > ffffffffa4abe534 consume_skb+0x64 ([kernel.kallsyms])
>
> I can see that on upstream as well, probably something within
> tracepoint entry code, because I have it working nicely when
> from kprobe, like:
>
> [root@ibm-x3650m4-02 perf]# ./perf probe 'consume_skb'
> [root@ibm-x3650m4-02 perf]# ./perf record -g -e probe:consume_skb* -aR ^C
>
Thanks Jiri,

My debugging script is using tracepoint with some filters which I
don't think probe can support.
Any one have fixes for this tracepoint issue?