Re: [lldb-dev] how do i submit my patch for 'Support demangling for D symbols via dlopen'

2018-03-09 Thread Timothee Cour via lldb-dev
I've registered to
http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits and sent
my patch via that email to lldb-comm...@lists.llvm.org but doesn't
appear yet on http://lists.llvm.org/pipermail/lldb-commits/ ; how long
does it take for
http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits to
subscribe?

Still not sure why github PR's can't be accepted to remove all this
friction for outside developpers.


On Tue, Feb 27, 2018 at 9:25 AM, Jim Ingham  wrote:
> I only briefly scanned the patch, but I'm not sure treating D as another 
> mangling variant of C++ is the best model - I think it will be easier if we 
> gather all the separate language features up in the individual languages.  
> You might have a look at the swift-enabled lldb 
> (https://github.com/apple/swift-lldb/) to see how it is handled there.  
> That's a little weak because we iterate over supported languages by hand.  
> When there were a few that wasn't an issue, but as we pick up more languages, 
> we should introduce a "do over supported languages" feature which would clean 
> up the logic there.
>
> Jim
>
>
>> On Feb 26, 2018, at 9:01 PM, Timothee Cour via lldb-dev 
>>  wrote:
>>
>> https://github.com/llvm-mirror/lldb/pull/3
>>
>> it would be *really* nice if llvm or lldb accepted industry standard
>> github PR's, at least as an option. Would make contributing so much
>> easier for outsiders
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


[lldb-dev] lldb compiled from source 5X slower than homebrew or default lldb

2018-03-09 Thread Timothee Cour via lldb-dev
while testing out https://github.com/llvm-mirror/lldb/pull/3 I noticed
that when I compiled lldb from source (even un-modified from git HEAD)
it was 5X slower than homebrew lldb or default lldb:

I'm compiling lldb as follows:
```
git clone https://github.com/llvm-mirror/llvm.git
cd llvm/tools
git clone https://github.com/llvm-mirror/lldb
## also, patch in https://github.com/llvm-mirror/lldb/pull/3
git clone https://github.com/llvm-mirror/clang
cd ..
mkdir build
cd build
ccmake .. -G Ninja
# here I set: CMAKE_BUILD_TYPE  Release
ninja all
```

I also tried setting `LLVM_ENABLE_ASSERTIONS OFF` but no difference


commands.txt
```
b FOO
r
bt
q
```

./test is some program i have.

```
time lldb -s commands.txt -- ./test
8 seconds
time ./build/bin/lldb -s commands.txt -- ./test
40 seconds
```
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] increase timeout for tests?

2018-03-09 Thread Pavel Labath via lldb-dev
On Thu, 8 Mar 2018 at 18:40, Davide Italiano  wrote:

> On Thu, Mar 8, 2018 at 10:29 AM, Greg Clayton  wrote:
> > It would be great to look into these and see what is taking so long.
> Some tests are doing way too much work and should be split up. But it would
> be great to see if we have any tests that are not good tests and are just
> taking too much time for no reason (like the watchpoint tests were that
> Pavel fixed).
> >
>
> I tend to agree with you. This is important. Pavel, is there a
> systematic way you use to profile test cases?
> Maybe we should consider having a testsuite mode where we warn for
> slow tests (or revamp the profiling mechanism, if there's one).
>
> Thanks!
>

I don't have any fancy mechanism for profiling this. I just hacked the
process_file function in dosep.py to measure the time each test takes and
report it if it exceeds a certain threshold. Then I just looked at the
tests that seemed like they are taking more time than they ought to.

This is the patch, in it's entirety:
--- a/packages/Python/lldbsuite/test/dosep.py
+++ b/packages/Python/lldbsuite/test/dosep.py
@@ -489,8 +489,13 @@ def process_file(test_file, dotest_argv,
inferior_pid_events):
 timeout = (os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or
getDefaultTimeout(dotest_options.lldb_platform_name))

+import time
+t = time.time()
 results.append(call_with_timeout(
 command, timeout, base_name, inferior_pid_events, test_file))
+t = time.time() - t
+if t > 20:
+print("XX   %s:
%f"%(base_name, t))

 # result = (name, status, passes, failures, unexpected_successes)
 timed_out = [name for name, status, _, _, _ in results

We could try to make this more fancy, but I'm not sure worth it. It just
occurred to me you can achieve a similar effect by running the test suite
with a reduced timeout threshold. Something like "LLDB_TEST_TIMEOUT=20s
ninja check-lldb" should do the trick. At one point Todd also implemented a
mechanism for recording what the test is doing before we time out and kill
it. The idea was that this would help us determine what the test was doing
when it was killed (and whether it was really stuck, or just slow).
However, I've never used this, so I have no idea what's the state of it.

I am not opposed to raising the timeout threshold, but before we do that,
we should check whether it will actually help. I.e., whether the test is
just slow, or it sometimes hangs (I think TestMultithreaded is a good
candidate for the latter). Can you check what is the time those tests take
to run individually? Current osx timeout (dosep.py:getDefaultTimeout) is
set to 6 minutes, so if the tests normally take much shorter than this
(less than 2 minutes?), I think there is something else going on, and
increasing the timeout will not help.

Another interesting thing may be to check the system load while running the
test suite. Nowadays, lldb will sometimes spawn N (where N is the number of
cpus) threads to do debug info parsing, so when we run N tests in parallel,
we may end up with N^2 threads competing for N cpus. I've never seen this
to be an issue as our tests generally don't have that much debug info to
begin with, but I don't think we've ever investigated this either...

BTW: This is my list of tests that take over 20 seconds (I ran it on linux
so it does not include any osx-specific ones):
20.729438 TestWatchpointCommands.py
21.158373 TestMiData.py
22.018853 TestRecursiveInferior.py
22.692744 TestInferiorCrashing.py
22.986511 TestLinuxCore.py
23.073790 TestInferiorAssert.py
23.193351 TestAnonymous.py
24.539430 TestMiStack.py
25.232940 TestUnwindExpression.py
26.608233 TestSetWatchlocation.py
28.977390 TestWatchLocation.py
29.057234 TestMultithreaded.py
29.813142 TestCPP11EnumTypes.py
30.830618 TestWatchLocationWithWatchSet.py
32.979785 TestThreadStates.py
33.435421 TestTargetWatchAddress.py
36.902618 TestNamespaceLookup.py
37.705945 TestMiSymbol.py
38.735631 TestValueObjectRecursion.py
46.870848 TestLldbGdbServer.py
49.594663 TestLoadUnload.py
52.186429 TestIntegerTypes.py
55.340360 TestMiExec.py
56.148259 TestIntegerTypesExpr.py
110.121061 TestMiGdbSetShow.py

The top one is an lldb-mi test, and this one takes long for a very silly
reason: When a test is xfailed because lldb-mi does not produce the
expected output, pexpect will keep waiting, hoping that it will eventually
produce a line that matches it's regex. This times out after 30 seconds, so
any xfailed lldb-mi test will take at least that long. I'm not sure how to
fix this without revamping the way we do lldb-mi testing (which would
probably be a good thing, but I don't see anyone queuing up to do that).
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] how do i submit my patch for 'Support demangling for D symbols via dlopen'

2018-03-09 Thread Davide Italiano via lldb-dev
On Fri, Mar 9, 2018 at 12:44 AM, Timothee Cour via lldb-dev
 wrote:
> I've registered to
> http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits and sent
> my patch via that email to lldb-comm...@lists.llvm.org but doesn't
> appear yet on http://lists.llvm.org/pipermail/lldb-commits/ ; how long
> does it take for
> http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits to
> subscribe?
>

Again, please sign-up for Phabricator as pointed out on the previous
mail and submit the patch there
https://llvm.org/docs/Phabricator.html

> Still not sure why github PR's can't be accepted to remove all this
> friction for outside developpers.
>

Because llvm main repo is still on svn. Once the migration to GitHub
will happen, probably PR will be accepted at some point.

Thanks,

--
Davide
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] how do i submit my patch for 'Support demangling for D symbols via dlopen'

2018-03-09 Thread Ted Woodward via lldb-dev
Also see http://llvm.org/docs/Contributing.html 

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux 
Foundation Collaborative Project

> -Original Message-
> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Davide
> Italiano via lldb-dev
> Sent: Friday, March 09, 2018 10:27 AM
> To: Timothee Cour 
> Cc: LLDB 
> Subject: Re: [lldb-dev] how do i submit my patch for 'Support demangling for D
> symbols via dlopen'
> 
> On Fri, Mar 9, 2018 at 12:44 AM, Timothee Cour via lldb-dev  d...@lists.llvm.org> wrote:
> > I've registered to
> > http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits and sent
> > my patch via that email to lldb-comm...@lists.llvm.org but doesn't
> > appear yet on http://lists.llvm.org/pipermail/lldb-commits/ ; how long
> > does it take for
> > http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits to
> > subscribe?
> >
> 
> Again, please sign-up for Phabricator as pointed out on the previous mail and
> submit the patch there https://llvm.org/docs/Phabricator.html
> 
> > Still not sure why github PR's can't be accepted to remove all this
> > friction for outside developpers.
> >
> 
> Because llvm main repo is still on svn. Once the migration to GitHub will
> happen, probably PR will be accepted at some point.
> 
> Thanks,
> 
> --
> Davide
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] how do i submit my patch for 'Support demangling for D symbols via dlopen'

2018-03-09 Thread Timothee Cour via lldb-dev
moved to https://reviews.llvm.org/D44321
it would've saved time if instructions had a TLDR that showed:

```
brew install homebrew/php/arcanist
arc diff master
# and following instructions
```


On Fri, Mar 9, 2018 at 8:44 AM, Ted Woodward via lldb-dev
 wrote:
> Also see http://llvm.org/docs/Contributing.html
>
> --
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
> Linux Foundation Collaborative Project
>
>> -Original Message-
>> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Davide
>> Italiano via lldb-dev
>> Sent: Friday, March 09, 2018 10:27 AM
>> To: Timothee Cour 
>> Cc: LLDB 
>> Subject: Re: [lldb-dev] how do i submit my patch for 'Support demangling for 
>> D
>> symbols via dlopen'
>>
>> On Fri, Mar 9, 2018 at 12:44 AM, Timothee Cour via lldb-dev > d...@lists.llvm.org> wrote:
>> > I've registered to
>> > http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits and sent
>> > my patch via that email to lldb-comm...@lists.llvm.org but doesn't
>> > appear yet on http://lists.llvm.org/pipermail/lldb-commits/ ; how long
>> > does it take for
>> > http://lists.llvm.org/cgi-bin/mailman/subscribe/lldb-commits to
>> > subscribe?
>> >
>>
>> Again, please sign-up for Phabricator as pointed out on the previous mail and
>> submit the patch there https://llvm.org/docs/Phabricator.html
>>
>> > Still not sure why github PR's can't be accepted to remove all this
>> > friction for outside developpers.
>> >
>>
>> Because llvm main repo is still on svn. Once the migration to GitHub will
>> happen, probably PR will be accepted at some point.
>>
>> Thanks,
>>
>> --
>> Davide
>> ___
>> lldb-dev mailing list
>> lldb-dev@lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
> ___
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


Re: [lldb-dev] Adding D language demangling support

2018-03-09 Thread Timothee Cour via lldb-dev
moved to: https://reviews.llvm.org/D44321

On Mon, Feb 26, 2018 at 10:06 PM, Davide Italiano  wrote:
> On Mon, Feb 26, 2018 at 8:45 PM, Timothee Cour via lldb-dev
>  wrote:
>> I made it work:
>> https://github.com/llvm-mirror/lldb/pull/3
>> (note: also requires the D plugin on D side which I can submit to
>> another repo separately, and which is small)
>>
>> not sure if lldb accepts github PR's but that's the simplest I could do
>>
>>
>
> No, llvm/lldb is still on svn so we don't really accept pull requests
> yet. You can submit a new review on Phabricator though.
> That said, thank you for your contribution.
> For new languages, we want to have a high quality barrier for entry. I
> really appareciate the fact that you took the time to split in
> multiple patches.
> Every change that needs to be committed to lldb needs to have a test
> associated.
> You may consider taking a look at the tests in `lit/` or the ones in
> `test/` and add tests for your changes.
> Don't hesitate to ask if you get stuck/have other questions.
>
> Thank you,
>
> --
> Davide
___
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev