[lldb-dev] Evaluating the same expression at the same breakpoint gets slower after a certain number of steps

Guilherme Andrade via lldb-dev lldb-dev at lists.llvm.org
Thu Jul 4 11:38:05 PDT 2019


I have two breakpoint inside methods that are called every frame (C++
project using Unreal), and every time one of them is reached, I evaluate
one expression (I'm being able to reproduce this using an undefined name,
say "undefinedVariable"). After a few iterations (usually tens), the time
it takes for LLDB to say that name doesn't exist increases, despite being
the same expression, at the same breakpoint and the call stack remaining
unchanged.

I've noticed that the number of lexical Decl queries and imports conducted
by Clang reported in 'Local metrics' increase.

They go from:
Number of visible Decl queries by name     : 29
Number of lexical Decl queries                    : 9
Number of imports initiated by LLDB           : 15
Number of imports conducted by Clang      : 827
Number of Decls completed                        : 5
Number of records laid out                          : 2

To:
Number of visible Decl queries by name     : 29
Number of lexical Decl queries                    : 14
Number of imports initiated by LLDB           : 15
Number of imports conducted by Clang      : 1342
Number of Decls completed                        : 5
Number of records laid out                          : 2

Also, the number of SymbolFileDWARF operations in the logs jumps from 366
to 406.

So, I've got two questions. 1) Is it safe to say that those extra imports
and Decl queries are responsible for the performance loss? 2) Why do they
happen?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190704/523b00d5/attachment-0001.html>


More information about the lldb-dev mailing list