]> git.lizzy.rs Git - rust.git/commit
compiletest: Run tests in their own thread to avoid blocking the scheduler
authorBrian Anderson <banderson@mozilla.com>
Thu, 15 Aug 2013 05:48:27 +0000 (22:48 -0700)
committerBrian Anderson <banderson@mozilla.com>
Thu, 15 Aug 2013 06:41:31 +0000 (23:41 -0700)
commit15fca2dad7c2abc60610635fd9ae0998abe43e54
tree179b5ab96870ed9d28117a0bca455784104e7d72
parent0d817ee869387322dec4d3f7d407dcc9f91c2632
compiletest: Run tests in their own thread to avoid blocking the scheduler

The calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.

Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.
src/compiletest/runtest.rs