Re: [PATCH] scripts: add ksymbolize.py

From: Alexander Potapenko
Date: Thu Sep 08 2016 - 05:46:33 EST


On Wed, Aug 24, 2016 at 8:19 PM, Levin, Alexander
<alexander.levin@xxxxxxxxxxx> wrote:
> On Wed, Aug 24, 2016 at 12:37:35PM -0400, Alexander Potapenko wrote:
>> he script that symbolizes BUG messages and KASAN error reports
>> by adding file:line information to each stack frame.
>> The script is a copy of
>> https://github.com/google/sanitizers/blob/master/address-sanitizer/tools/kasan_symbolize.py
>> , originally written by Andrey Konovalov.
>
> So what's the difference between this script and scripts/decode_stacktrace.sh that already lives upstream?
The biggest problem is that decode_stacktrace.sh invokes addr2line for
each output line.
It took the script 30 seconds to symbolize a report with 57 stack
frames on my machine, whereas ksymbolize.py did that in 1.5 seconds.
I've taken a look at the decode_stacktrace.sh output, and found it not
differing much from that of ksymbolize.py
There are a few minor differences that could be probably fixed in
decode_stacktrace.sh (the way how inlined frames are printed,
symbolization of RIP addresses or KASAN report headings), so I don't
have a strong opinion about whether we need to replace one with
another.
In my opinion it's easier to hack a Python script, but YMMV.
>
> Thanks,
> Sasha



--
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-StraÃe, 33
80636 MÃnchen

GeschÃftsfÃhrer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg