<div dir="ltr"><div>Hi all,</div><div><br></div><div>I ran the tests 100 times to compare before/after enabling LLGS Local. Below you will see failure counts for each test.</div><div><br></div><div>There is some forward movement and some backward movement. I think a lot of the increased failures are just race conditions that already exist that are just bein exacerbated as a result of timing changes.</div><div><br></div><div>We are going to XFAIL these tests as necessary and work very hard to resolve remaining race conditions.</div><div><br></div><div>Local Linux (old)</div><div> 26 TestAttachResume</div><div> 2 TestChangeValueAPI</div><div> 2 TestFormats</div><div> 5 TestMiData</div><div> 100 TestMiExec</div><div> 100 TestMiInterpreterExec</div><div> 1 TestMiSignal</div><div> 100 TestMiStack</div><div> 1 TestMiSymbol</div><div> 1 TestMiSyntax</div><div> 16 TestProcessAttach</div><div> 20 TestProcessIO</div><div> 39 TestRegisters</div><div><br></div><div>LLGS Local (new)</div><div> 6 TestChangeValueAPI</div><div> 2 TestConcurrentEvents</div><div> 1 TestCreateAfterAttach</div><div> 34 TestFormats</div><div> 100 TestMiExec</div><div> 100 TestMiInterpreterExec</div><div> 45 TestMiSignal</div><div> 100 TestMiStack</div><div> 17 TestProcessIO</div><div> 10 TestSetWatchlocation</div><div> 1 TestSignalsAPI</div><div> 11 TestTargetWatchAddress</div><div> 6 TestThreadSpecificBreakpoint</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 1, 2015 at 6:21 PM, Vince Harron <span dir="ltr"><<a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: vharron<br>
Date: Sun Mar 1 17:21:29 2015<br>
New Revision: 230919<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230919&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230919&view=rev</a><br>
Log:<br>
Linux - debugging of local processes via lldb-gdbserver<br>
<br>
Instead of lldb calling the ptrace APIs directly, it launches an llgs<br>
instance and communicates with it via the remote debug protocol.<br>
<br>
This has two advantages.<br>
<br>
There is more code shared between the remote debugging code path<br>
and the local debugging code path. If a feature works in remote, it<br>
probably works locally and vice-versa.<br>
<br>
It makes us more architecturally similar to OSX (which also does<br>
local debugging via a connection to debugserver).<br>
<br>
This path is called LLGS local. We think that this configuration is<br>
now at parity with (or better than) local linux debugging.<br>
<br>
It is currently invoked if you have an environment variable defined<br>
"PLATFORM_LINUX_FORCE_LLGS_LOCAL"<br>
<br>
We would like to switch to LLGS local as the default path and only<br>
use the non-LLGS path if someone has an environment variable defined<br>
"PLATFORM_LINUX_DISABLE_LLGS_LOCAL"<br>
<br>
Later, if all goes well, we would like to remove non-LLGS local<br>
debugging support to simplify the codebase and avoid confusion.<br>
<br>
<br>
Modified:<br>
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp<br>
lldb/trunk/test/lldbtest.py<br>
<br>
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=230919&r1=230918&r2=230919&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=230919&r1=230918&r2=230919&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)<br>
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Sun Mar 1 17:21:29 2015<br>
@@ -64,13 +64,13 @@ namespace<br>
static PropertyDefinition<br>
g_properties[] =<br>
{<br>
- { "use-llgs-for-local" , OptionValue::eTypeBoolean, true, false, NULL, NULL, "Control whether the platform uses llgs for local debug sessions." },<br>
+ { "use-llgs-for-local" , OptionValue::eTypeBoolean, true, true, NULL, NULL, "Control whether the platform uses llgs for local debug sessions." },<br>
{ NULL , OptionValue::eTypeInvalid, false, 0 , NULL, NULL, NULL }<br>
};<br>
<br>
- // Allow environment variable to force using llgs-local.<br>
- if (getenv("PLATFORM_LINUX_FORCE_LLGS_LOCAL"))<br>
- g_properties[ePropertyUseLlgsForLocal].default_uint_value = true;<br>
+ // Allow environment variable to disable llgs-local.<br>
+ if (getenv("PLATFORM_LINUX_DISABLE_LLGS_LOCAL"))<br>
+ g_properties[ePropertyUseLlgsForLocal].default_uint_value = false;<br>
<br>
return g_properties;<br>
}<br>
<br>
Modified: lldb/trunk/test/lldbtest.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=230919&r1=230918&r2=230919&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=230919&r1=230918&r2=230919&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/test/lldbtest.py (original)<br>
+++ lldb/trunk/test/lldbtest.py Sun Mar 1 17:21:29 2015<br>
@@ -595,7 +595,11 @@ def expectedFailureWindows(bugnumber=Non<br>
<br>
def expectedFailureLLGS(bugnumber=None, compilers=None):<br>
def fn(self):<br>
- return 'PLATFORM_LINUX_FORCE_LLGS_LOCAL' in os.environ and self.expectedCompiler(compilers)<br>
+ # llgs local is only an option on Linux systems<br>
+ if 'linux' not in sys.platform:<br>
+ return False<br>
+ self.runCmd('settings show platform.plugin.linux.use-llgs-for-local')<br>
+ return 'true' in self.res.GetOutput() and self.expectedCompiler(compilers)<br>
if bugnumber: return expectedFailure(fn, bugnumber)<br>
<br>
def skipIfRemote(func):<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="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">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 858-442-0868</td></tr></tbody></table><br></div></div>
</div>