Bug#879003: diffoscope: objdump --line-numbers makes diffoscope *very* slow
Mike Hommey
mh at glandium.org
Thu Oct 19 09:33:45 UTC 2017
On Thu, Oct 19, 2017 at 08:50:19AM +0900, Mike Hommey wrote:
> On Wed, Oct 18, 2017 at 07:29:52PM +0900, Mike Hommey wrote:
> > Package: diffoscope
> > Version: 87
> > Severity: normal
> >
> > Dear Maintainer,
> >
> > Today I was comparing firefox builds from mozilla CI with diffoscope,
> > and it was taking an awful lot of time. Quick inspection revealed that
> > this is largely due to objdump --line-numbers. Remove --line-numbers
> > from the objdump command line created in ObjdumpDisassembleSection makes
> > a huge difference:
> >
> > $ time diffoscope --html diff.html firefox{1,2}.tar.bz2 # unpatched
> > real 58m48.870s
> > user 62m41.966s
> > sys 3m3.710s
> >
> > $ time diffoscope --html diff.html firefox{1,2}.tar.bz2 # patched
> > real 7m19.159s
> > user 7m42.558s
> > sys 3m2.730s
>
> Some timings, fwiw:
>
> $ time objdump --disassemble --demangle --section=.text libxul.so > /dev/null
>
> real 0m23.431s
> user 0m23.366s
> sys 0m0.064s
>
> $ time objdump --line-numbers --disassemble --demangle --section=.text libxul.so > /dev/null
>
> real 25m49.537s
> user 25m49.191s
> sys 0m0.308s
FWIW:
$ llvm-objdump-4.0 --disassemble --section=.text libxul.so > /dev/null
real 0m8.992s
user 0m8.854s
sys 0m0.112s
$ time llvm-objdump-4.0 --line-numbers --disassemble --section=.text libxul.so > /dev/null
real 0m19.738s
user 0m19.461s
sys 0m0.120s
(on the same file as above, not actually containing debug info)
but it doesn't support --demangle. Also, its --disassemble output has
some formatting issues.
Versions before 4.0 didn't support --line-numbers.
Mike
More information about the Reproducible-builds
mailing list