lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181205122838.GH2950@krava>
Date:   Wed, 5 Dec 2018 13:28:38 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] perf, tools: Support srccode output

On Mon, Dec 03, 2018 at 04:18:48PM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>
> 
> When looking at PT or brstackinsn traces with perf script
> it can be very useful to see the source code. This adds a simple
> facility to print them with perf script, if the information
> is available through dwarf
> 
> % perf record ...
> % perf script -F insn,ip,sym,srccode
> ...
> 
>           4004c6 main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004c6 main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004cd main
> 5               for (i = 0; i < 10000000; i++)
>            4004b3 main
> 6                       v++;
> 
> % perf record -b ...
> % perf script -F insn,ip,sym,srccode,brstackinsn
> 
> ...
>        main+22:
>         0000000000400543        insn: e8 ca ff ff ff            # PRED
> |18                     f1();
>         f1:
>         0000000000400512        insn: 55
> |10       {
>         0000000000400513        insn: 48 89 e5
>         0000000000400516        insn: b8 00 00 00 00
> |11             f2();
>         000000000040051b        insn: e8 d6 ff ff ff            # PRED
>         f2:
>         00000000004004f6        insn: 55
> |5        {
>         00000000004004f7        insn: 48 89 e5
>         00000000004004fa        insn: 8b 05 2c 0b 20 00
> |6              c = a / b;
>         0000000000400500        insn: 8b 0d 2a 0b 20 00
>         0000000000400506        insn: 99
>         0000000000400507        insn: f7 f9
>         0000000000400509        insn: 89 05 29 0b 20 00
>         000000000040050f        insn: 90
> |7        }
>         0000000000400510        insn: 5d
>         0000000000400511        insn: c3                        # PRED
>         f1+14:
>         0000000000400520        insn: b8 00 00 00 00
> |12             f2();
>         0000000000400525        insn: e8 cc ff ff ff            # PRED
>         f2:
>         00000000004004f6        insn: 55
> |5        {
>         00000000004004f7        insn: 48 89 e5
>         00000000004004fa        insn: 8b 05 2c 0b 20 00
> |6              c = a / b;
> 
> Not supported for callchains currently, would need some
> layout changes there.

nice, works nicely, especialy with --xed

Acked-by: Jiri Olsa <jolsa@...nel.org>

I need to check, but is there a way to make this work with
perf-with-kcore script? looks like we endup with kcore and
won't allow vmlinux lookups for debug info

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ