[lldb-dev] interesting note on build times: configure/make vs. cmake/ninja

Todd Fiala tfiala at google.com
Mon Mar 10 13:32:32 PDT 2014

Ah thanks for the details, Ed!

I'm going to clear up some other bits I guess I left dangling in this
thread before:

1. I did fix the bug that looked like it was a gold linker issue.  It was
really a general elf core file memory region handling bug that the gold
linker just happened to expose.  That's in top of tree as of maybe a month

2. Something changed in running 'ninja check-lldb' sometime after I wrote
that above.  It went back to on par with configure/make test times.  I
think I forgot to mention that.  (Side note: Steve Pucci's
LLDB_TEST_THREADS change works with 'ninja check-lldb' - the only side
effect I see is that you can no longer count on order of output between
lines as they are interleaved, although whole lines are fine).

3. I'm back to using Ninja+cmake+gold linker as my preferred local dev
build due to the faster turn-around on build times.

> Do you see problems w/ terminating LLDB while the debuggee is stopped
(at a breakpoint, say)?

Checking now on Ubuntu 12.04 x86_64:

1. start lldb, have lldb start process, set breakpoint, run to breakpoint,
quit lldb and have process quit: exits fine.

2. start lldb, have lldb start process, set breakpoint, run to breakpoint,
detach from process, quit lldb: exits fine, but didn't see the output on
the (shared) stdout channel between lldb and the process I just detached
from.  That might be fine, depends on the semantics around whether the
detached process can write to the lldb terminal that it previously shared.
 (I don't know the answer to that, although intuitively I expected to see
the detached process write to the lldb terminal as it would have had it
still be attached).

I didn't see any slow-down in quitting in #1 above.  #2 was also fast (but
nothing attached).  Both looked instantaneous.

Sounds very likely that your ProcessPOSIX change addressed the issues.
 Nice job, Ed!  ProcessLinux is nearly entirely ProcessPOSIX, the big diff
being a different ProcessMonitor and a few minor bits of functionality that
differ from ProcessFreeBSD.


On Mon, Mar 10, 2014 at 1:15 PM, Ed Maste <emaste at freebsd.org> wrote:

> On 5 February 2014 18:43, Todd Fiala <tfiala at google.com> wrote:
> >
> > Running tests via the 'ninja check-lldb' takes a whopping 25.5 minutes.
> Hi Todd,
> Do you see problems w/ terminating LLDB while the debuggee is stopped
> (at a breakpoint, say)?  I observed problems on FreeBSD with both
> "detach" and "quit", described in
> http://llvm.org/bugs/show_bug.cgi?id=18894.  In both cases the debugee
> ended up aborting due to a SIGTRAP, and in the case of quitting, LLDB
> took 3-4 seconds extra to exit.
> I fixed the detach case in r201724 -- prior to that change breakpoints
> were being left in the debuggee after detach.
> The quit case seems to be related, and it seems Process*::DoDestroy is
> somewhat incomplete (and has been since its introduction).  I still
> need to figure out exactly what's needed, but for now I just added a
> call in ProcessPOSIX::DoDetach() to detach the ptrace monitor:
> +        error = m_monitor->Detach(GetID());
> and LLDB exits immediately after a quit, I have no more debugees
> aborting, and the ninja check-lldb runs in about 3 or 4 minutes
> instead of the ~half hour it was before.
> -Ed

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/20140310/c3072e3c/attachment.html>

More information about the lldb-dev mailing list