[lldb-dev] [PATCH] make dosep.ty test driver multi-threadable

Todd Fiala tfiala at google.com
Thu Mar 6 22:32:47 PST 2014

Steve's change went in earlier today.

> This doesn't yet work with ninja makes, but tfiala or I will look at that
as well.

I did look into this and it actually works fine without modification if you
do the 'ninja check-lldb' with the environment variable set.

This was the run I just did using 32 procs:

Running multithreaded with 32 threads.
Ran 278 tests.

*real    1m22.855s*
user    5m38.520s
sys     0m51.520s

That used to take 10+ minutes.

On Wed, Mar 5, 2014 at 9:51 AM, Steve Pucci <spucci at google.com> wrote:

> Hi all,
> This patch provides support for running the dosep.ty test driver with
> multiple threads.  It speeds up running the full test suite on my HP z620
> Ubuntu machine with 32 hyperthreaded CPUs from 11 minutes to about 1m13s
> (about 9x).
> The default behavior is to run single-threaded as before.  If the
> environment variable LLDB_TEST_THREADS is set, a Python work queue is set
> up with that many worker threads.
> To avoid collisions within a test directory where multiple tests make use
> of the same prebuilt executable, the unit of work for the worker threads is
> a single directory (that is, all tests within a directory are processed in
> the normal serial way by a single thread).
> I've run this way a number of times; the only issue I found was that the
> TestProcessAttach.py test failed once, when attempting to attach to the
> process "a.out" by name.  I assume this is because some other thread was
> running an executable of that name at the same time, and we were attempting
> to attach to the wrong one, so I changed that test to use a different
> executable name (that change is also included in the attached patch).
> There is actually an opportunity to speed the overall test time further
> (maybe as much as another 1.5x or so) by dividing up a few long-running
> tests into multiple directories, but I'm not planning to do that now.
> This doesn't yet work with ninja makes, but tfiala or I will look at that
> as well.
>  - Steve
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140306/a0c1337d/attachment.html>

More information about the lldb-dev mailing list