<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Good catch Pavel, I missed that part where it calls Index manually even if we have accelerator tables where we don't need to manually index. <div class=""><br class=""></div><div class="">We should modify SymbolFileDWARF::Index() that currently looks like:<div class=""><br class=""></div><div class=""><br class=""></div><div class="">void SymbolFileDWARF::Index() {<br class="">  if (m_indexed)<br class="">    return;<br class="">...</div><div class="">}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">To look like:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">bool SymbolFileDWARF::HasFullIndex() const {</div><div class="">  return m_using_apple_tables;</div><div class="">}</div></div><div class=""><br class=""></div><div class="">void SymbolFileDWARF::Index() {<br class="">  if (m_indexed || HasFullIndex())<br class="">    return;<br class=""></div><div class="">...</div><div class="">}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">SymbolFileDWARF::HasFullIndex() is a new function we need to add. Then as we update LLDB to handle new accelerator tables, like the new DWARF 5 tables Pavel is working on getting checked into LLVM and LLDB, we can update SymbolFileDWARF::HasFullIndex() as needed. This should return the high performance on systems with full accelerator tables. Let us know if this works.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Greg Clayton</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Mar 13, 2018, at 2:56 AM, Pavel Labath via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I would start by looking at <a href="https://reviews.llvm.org/D32598" class="">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 class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, 12 Mar 2018 at 21:59, Adrian Prantl via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class=""></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 class="">
<br class="">
-- adrian<br class="">
<br class="">
> On Mar 12, 2018, at 2:57 PM, Timothee Cour <<a href="mailto:timothee.cour2@gmail.com" target="_blank" class="">timothee.cour2@gmail.com</a>> wrote:<br class="">
><br class="">
> after further inspection it turns out it's a performance regression<br class="">
> between llvm 5 and llvm 6:<br class="">
><br class="">
> $homebrew_D/Cellar/llvm/5.0.1/lldb -s test_lldb.txt -- prog<br class="">
> 8 seconds<br class="">
> $homebrew_D/Cellar/llvm/6.0.0/bin/lldb -s test_lldb.txt -- prog<br class="">
> 40 seconds<br class="">
><br class="">
> cat test_lldb.txt:<br class="">
> ```<br class="">
> b FOO<br class="">
> r<br class="">
> bt<br class="">
> q<br class="">
> ```<br class="">
><br class="">
> prog is some binary I'm debugging. It's unfortunately hard to reduce.<br class="">
> What are good ways to investigate this?<br class="">
><br class="">
><br class="">
><br class="">
> On Mon, Mar 12, 2018 at 1:42 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class="">
>> Have you tried diff'ing your cmake invocation against the on used by homebrew?<br class="">
>><br class="">
>> -- adrian<br class="">
>><br class="">
>>> On Mar 9, 2018, at 12:59 AM, Timothee Cour via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>> wrote:<br class="">
>>><br class="">
>>> while testing out <a href="https://github.com/llvm-mirror/lldb/pull/3" rel="noreferrer" target="_blank" class="">https://github.com/llvm-mirror/lldb/pull/3</a> I noticed<br class="">
>>> that when I compiled lldb from source (even un-modified from git HEAD)<br class="">
>>> it was 5X slower than homebrew lldb or default lldb:<br class="">
>>><br class="">
>>> I'm compiling lldb as follows:<br class="">
>>> ```<br class="">
>>> git clone <a href="https://github.com/llvm-mirror/llvm.git" rel="noreferrer" target="_blank" class="">https://github.com/llvm-mirror/llvm.git</a><br class="">
>>> cd llvm/tools<br class="">
>>> git clone <a href="https://github.com/llvm-mirror/lldb" rel="noreferrer" target="_blank" class="">https://github.com/llvm-mirror/lldb</a><br class="">
>>> ## also, patch in <a href="https://github.com/llvm-mirror/lldb/pull/3" rel="noreferrer" target="_blank" class="">https://github.com/llvm-mirror/lldb/pull/3</a><br class="">
>>> git clone <a href="https://github.com/llvm-mirror/clang" rel="noreferrer" target="_blank" class="">https://github.com/llvm-mirror/clang</a><br class="">
>>> cd ..<br class="">
>>> mkdir build<br class="">
>>> cd build<br class="">
>>> ccmake .. -G Ninja<br class="">
>>> # here I set: CMAKE_BUILD_TYPE      Release<br class="">
>>> ninja all<br class="">
>>> ```<br class="">
>>><br class="">
>>> I also tried setting `LLVM_ENABLE_ASSERTIONS OFF` but no difference<br class="">
>>><br class="">
>>><br class="">
>>> commands.txt<br class="">
>>> ```<br class="">
>>> b FOO<br class="">
>>> r<br class="">
>>> bt<br class="">
>>> q<br class="">
>>> ```<br class="">
>>><br class="">
>>> ./test is some program i have.<br class="">
>>><br class="">
>>> ```<br class="">
>>> time lldb -s commands.txt -- ./test<br class="">
>>> 8 seconds<br class="">
>>> time ./build/bin/lldb -s commands.txt -- ./test<br class="">
>>> 40 seconds<br class="">
>>> ```<br class="">
>>> _______________________________________________<br class="">
>>> lldb-dev mailing list<br class="">
>>> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a><br class="">
>>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="">
>><br class="">
<br class="">
_______________________________________________<br class="">
lldb-dev mailing list<br class="">
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="">
</blockquote></div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>