<div dir="ltr">Ah thanks for the details, Ed!<div><br></div><div>I'm going to clear up some other bits I guess I left dangling in this thread before:</div><div><br></div><div>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 ago.</div>
<div><br></div><div>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).</div>
<div><br></div><div>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.</div><div><br></div><div>> <span style="font-family:arial,sans-serif;font-size:13px">Do you see problems w/ terminating LLDB while the debuggee is stopped</span></div>
<span style="font-family:arial,sans-serif;font-size:13px">(at a breakpoint, say)?</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Checking now on Ubuntu 12.04 x86_64:</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">1. start lldb, have lldb start process, set breakpoint, run to breakpoint, quit lldb and have process quit: exits fine.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">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).</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I didn't see any slow-down in quitting in #1 above. #2 was also fast (but nothing attached). Both looked instantaneous.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">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.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">-Todd</font></div><div><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Mar 10, 2014 at 1:15 PM, Ed Maste <span dir="ltr"><<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 5 February 2014 18:43, Todd Fiala <<a href="mailto:tfiala@google.com">tfiala@google.com</a>> wrote:<br>
><br>
> Running tests via the 'ninja check-lldb' takes a whopping 25.5 minutes.<br>
<br>
</div>Hi Todd,<br>
<br>
Do you see problems w/ terminating LLDB while the debuggee is stopped<br>
(at a breakpoint, say)? I observed problems on FreeBSD with both<br>
"detach" and "quit", described in<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=18894" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=18894</a>. In both cases the debugee<br>
ended up aborting due to a SIGTRAP, and in the case of quitting, LLDB<br>
took 3-4 seconds extra to exit.<br>
<br>
I fixed the detach case in r201724 -- prior to that change breakpoints<br>
were being left in the debuggee after detach.<br>
<br>
The quit case seems to be related, and it seems Process*::DoDestroy is<br>
somewhat incomplete (and has been since its introduction). I still<br>
need to figure out exactly what's needed, but for now I just added a<br>
call in ProcessPOSIX::DoDetach() to detach the ptrace monitor:<br>
<br>
+ error = m_monitor->Detach(GetID());<br>
<br>
and LLDB exits immediately after a quit, I have no more debugees<br>
aborting, and the ninja check-lldb runs in about 3 or 4 minutes<br>
instead of the ~half hour it was before.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Ed<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>