Code review comment for lp:~michihenning/unity-scopes-api/abigail

Revision history for this message
James Henstridge (jamesh) wrote :

> > 2. Do you even need to dump the current ABI to an XML file as part of the
> > test? Might it be quicker to just have abidiff compare the reference XML
> dump
> > against the just-built .so file? That would reduce the number of moving
> parts
> > in the test, and would likely be even faster.
>
> I considered doing this, but decided not to. Any speed difference is
> completely unnoticeable because analysing the dump takes many times longer
> than uncompressing it. That's for a large dump. For a small dump, the
> difference is also unnoticeable because a small dump will uncompress very
> quickly.
>
> And I figured it would be useful to leave the dump behind. When something goes
> wrong, and people want to dig into it, they don't have to copy and uncompress
> it manually, making sure that they use the correct arch subdirectory.
>
> The dump file is also useful for reporting issues with abidiff, because I have
> everything I need (both dumps and the suppressions file) right there.
>
> I've updated the clean target though to get rid of the base dump, so a "make
> clean" actually reclaims the disk space.

I was curious what the time difference was, so I ran a few tests on my Chromebook (since armhf always seems to be the last to finish building, and hopefully the Chromebook is similar enough). I used the vivid versions of abigail and extracted the latest Xenial builds of libunity-scopes-api (this uses detached debug info, but hopefully that doesn't influence things too much).

First of all, the timings to extract an ABI dump and compare it to itself:

    $ time abidw --debug-info-dir root/usr/lib/debug root/usr/lib/arm-linux-gnueabihf/libunity-scopes.so.1.0.3 > dump.xml
    real 1m25.146s
    user 1m21.865s
    sys 0m2.975s

    $ time abidiff dump.xml dump.xml
    real 3m4.622s
    user 3m1.870s
    sys 0m2.565s

And as the alternative I was suggesting, comparing the XML dump against the library itself:

    $ time abidiff --debug-info-dir2 root/usr/lib/debug dump.xml root/usr/lib/arm-linux-gnueabihf/libunity-scopes.so.1.0.3
    real 2m30.120s
    user 2m27.060s
    sys 0m2.605s

So in addition to saving the 1.5 minutes taken to create the XML dump, the actual comparison process took 30 seconds less. All up, that's a 45% reduction in runtime

The times with the xenial version of abigail-tools seem a bit different on my amd64 box, but I'm still seeing significantly lower overall time for abidiff against the .so vs. abidw+abidiff.

« Back to merge proposal