<div dir="ltr">I would start by looking at <a href="https://reviews.llvm.org/D32598">https://reviews.llvm.org/D32598</a>, which adds a bunch of work we do up-front. I remember looking at this a while back and not being sure whether all of that work is relevant for osx, actually. (I'm specifically thinking of the SymbolFileDWARF::Index call, which is done unconditionally, but I think that index is unused if we have accelerator tables).</div><br><div class="gmail_quote"><div dir="ltr">On Mon, 12 Mar 2018 at 21:59, Adrian Prantl via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If this is a Mac I would recommend to build both lldbs in RelWithDebInfo mode and then run them through Instruments and compare the traces. I'd be very interested in learning what the cause for the slowdown is.<br>
<br>
-- adrian<br>
<br>
> On Mar 12, 2018, at 2:57 PM, Timothee Cour <<a href="mailto:timothee.cour2@gmail.com" target="_blank">timothee.cour2@gmail.com</a>> wrote:<br>
><br>
> after further inspection it turns out it's a performance regression<br>
> between llvm 5 and llvm 6:<br>
><br>
> $homebrew_D/Cellar/llvm/5.0.1/lldb -s test_lldb.txt -- prog<br>
> 8 seconds<br>
> $homebrew_D/Cellar/llvm/6.0.0/bin/lldb -s test_lldb.txt -- prog<br>
> 40 seconds<br>
><br>
> cat test_lldb.txt:<br>
> ```<br>
> b FOO<br>
> r<br>
> bt<br>
> q<br>
> ```<br>
><br>
> prog is some binary I'm debugging. It's unfortunately hard to reduce.<br>
> What are good ways to investigate this?<br>
><br>
><br>
><br>
> On Mon, Mar 12, 2018 at 1:42 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br>
>> Have you tried diff'ing your cmake invocation against the on used by homebrew?<br>
>><br>
>> -- adrian<br>
>><br>
>>> On Mar 9, 2018, at 12:59 AM, Timothee Cour via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
>>><br>
>>> while testing out <a href="https://github.com/llvm-mirror/lldb/pull/3" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/lldb/pull/3</a> I noticed<br>
>>> that when I compiled lldb from source (even un-modified from git HEAD)<br>
>>> it was 5X slower than homebrew lldb or default lldb:<br>
>>><br>
>>> I'm compiling lldb as follows:<br>
>>> ```<br>
>>> git clone <a href="https://github.com/llvm-mirror/llvm.git" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/llvm.git</a><br>
>>> cd llvm/tools<br>
>>> git clone <a href="https://github.com/llvm-mirror/lldb" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/lldb</a><br>
>>> ## also, patch in <a href="https://github.com/llvm-mirror/lldb/pull/3" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/lldb/pull/3</a><br>
>>> git clone <a href="https://github.com/llvm-mirror/clang" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/clang</a><br>
>>> cd ..<br>
>>> mkdir build<br>
>>> cd build<br>
>>> ccmake .. -G Ninja<br>
>>> # here I set: CMAKE_BUILD_TYPE Release<br>
>>> ninja all<br>
>>> ```<br>
>>><br>
>>> I also tried setting `LLVM_ENABLE_ASSERTIONS OFF` but no difference<br>
>>><br>
>>><br>
>>> commands.txt<br>
>>> ```<br>
>>> b FOO<br>
>>> r<br>
>>> bt<br>
>>> q<br>
>>> ```<br>
>>><br>
>>> ./test is some program i have.<br>
>>><br>
>>> ```<br>
>>> time lldb -s commands.txt -- ./test<br>
>>> 8 seconds<br>
>>> time ./build/bin/lldb -s commands.txt -- ./test<br>
>>> 40 seconds<br>
>>> ```<br>
>>> _______________________________________________<br>
>>> lldb-dev mailing list<br>
>>> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
>><br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div>