[Lldb-commits] [PATCH] D12651: Add ctrl-c support to parallel dotest.py.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 4 17:40:37 PDT 2015
On Fri, Sep 4, 2015 at 5:10 PM Todd Fiala <todd.fiala at gmail.com> wrote:
> tfiala added a comment.
> In http://reviews.llvm.org/D12651#240480, @zturner wrote:
> > Tried out this patch, unfortunately I'm seeing the same thing. The very
> > first call to worker.join() is never returning.
> > It's unfortunate that it's so hard to debug this stuff, do you have any
> > suggestions for how I can try to nail down what the child dotest
> > is actually doing? I wonder if it's blocking somewhere in its script,
> > if this is some quirk of the multiprocessing library's dynamic
> invocation /
> > whatever magic is does.
> > How much of an effort would it be to make the switch to threads now? The
> > main thing we'd have to do is get rid of all of the globals in dotest,
> > make a DoTest class or something.
> It's a bit more work than I want to take on right now. I think we really
> may want to keep the multiprocessing and just not exec out to dotest.py for
> a third-ish time for each inferior.
Just to clarify, are you saying we may want to keep multiprocessing over
threads even if you can solve the exec problem? Any particular reason?
Multi-threaded is much easier to debug, for starters, because you can just
attach your debugger to a single process. It also solves a lot of race
conditions and makes output processing easier (not to mention higher
performance), because you don't even need a way to have the sub-processes
communicate their results back to the parent because the results are just
in memory. stick them in a synchronized queue and the parent can just
process it. So it would probably even speed up the test runner.
I think if there's not a very good reason to keep multiprocessing around,
we should aim for a threaded approach. My understanding is that lit
already does this, so there's no fundamental reason it shouldn't work
correctly on MacOSX, just have to solve the exec problem like you mentioned.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-commits