Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index



On Thu, 2012-02-09 at 20:35 +0100, Jan Holesovsky wrote:
Also check the version of make. make 3.81 shipped with cygwin is buggy. 
Use make 3.82 from http://dev-www.libreoffice.org/bin/cygwin/make

Actually, I am not really happy with stock 3.82 either; on my Linux box,
it adds 5 unnecessary minutes when building, and then another 5 for make
dev-install (it spends them doing noting, with 100% cpu load).

        Ho hum; I was wondering why it was so slow again to run 'make' - so I
ran my old test in tail_build:

        $ strace -f make 2>&1 | grep 'stat64' /tmp/slog | sed 's|.*/home/opt/libreoffice/||' | sed 
's/".*$//' | sort | uniq -c | sort -n

        Which yields the depressingly familiar:
...
   5164 master/solver/unxlngi6.pro/inc/rtl/string.hxx
   5165 master/solver/unxlngi6.pro/inc/sal/log.hxx
   5166 master/solver/unxlngi6.pro/inc/rtl/ustring.h
   5168 master/solver/unxlngi6.pro/inc/rtl/string.h
   5168 master/solver/unxlngi6.pro/inc/rtl/textcvt.h
   5172 master/solver/unxlngi6.pro/inc/rtl/textenc.h
   5175 master/solver/unxlngi6.pro/inc/osl/interlck.h
   5194 master/solver/unxlngi6.pro/inc/osl/diagnose.h
   5200 master/solver/unxlngi6.pro/inc/sal/detail/log.h
   5233 master/solver/unxlngi6.pro/inc/sal/saldllapi.h
   5233 master/solver/unxlngi6.pro/inc/sal/types.h
   5233 master/solver/unxlngi6.pro/inc/sal/typesizes.h
   5234 master/solver/unxlngi6.pro/inc/sal/macros.h
   5235 master/solver/unxlngi6.pro/inc/sal/config.h

        On first glance it looks like the glob speedup horribly regressed. Then
I did a bit more digging inside the running 'make' and ended up with
things like:

(gdb) up
#5  func_wildcard (o=0xd2046d0 "", argv=0xbfff7df0, funcname=0x80696f4 "wildcard") at 
function.c:1342
1342       char *p = string_glob (argv[0]);
(gdb) l
1337    func_wildcard (char *o, char **argv, const char *funcname UNUSED)
1338    {
1342       char *p = string_glob (argv[0]);
1343       o = variable_buffer_output (o, p, strlen (p));
1345       return o;
1346    }
(gdb) p argv[0]
$2 = 0xd2047e0 "/data/opt/libreoffice/devel/sw/source/filter/rtf/rtffly.cxx"

        Interestingly though this call site is responsible only for around 6000
calls to glob (and hence stat) itself, almost all of them equivalently
banal - calling 'glob' on a single file-name that we know must exist ;-)
I imagine this is some gnu-maker's fault ...

commit 6055a5df7b6e7452987a9584d10f436ca2d349fd
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Fri Oct 7 16:40:22 2011 +0200

    no more gbuild loops: break early on nonexistent objects (this commit
    breaks multi-repo support)

        could it be this one ? that introduces a good few wildcards ? it's odd -
by the time we get to here:

strace -o /tmp/slog -f make
/data/opt/libreoffice/devel/desktop/Library_sofficeapp.mk:91: 
[ WARN   ] !!!
[ WARN   ] !!! desktop/source/app/main is linked in by Executable/soffice.bin 
Library/libsofficeapp.so
[ WARN   ] !!!
/data/opt/libreoffice/devel/desktop/Library_unopkgapp.mk:59: 
[ WARN   ] !!!
[ WARN   ] !!! desktop/source/app/lockfile is linked in by Library/libsofficeapp.so 
Library/libunopkgapp.so
[ WARN   ] !!!

        I get nearly a million stats:

grep stat64 /tmp/slog | wc -l
979220

        No doubt all of the same files :-)

        running with a debug build of make inside gdb:

catch syscall stat64
continue 100000

        exits before we get near that stat count; most odd.

        So - the wildcard stuff is just a clue I suppose, someone with more
time should re-investigate I guess; I had wondered why tail_build was so
slow again :-)

        All the best,

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.