[Dexter] Improve performance by evaluating expressions only when needed
authorStephen Tozer <Stephen.Tozer@Sony.com>
Tue, 14 Sep 2021 11:06:23 +0000 (12:06 +0100)
committerStephen Tozer <Stephen.Tozer@Sony.com>
Tue, 14 Sep 2021 13:09:23 +0000 (14:09 +0100)
commit9bbc0c1ffb47f9cf4c9d8e9a0e8100002fe5aafb
tree1009604fc55d1e264344d4639f112bad350ddcd1
parent8cfab5de13a8ec3a2ffccb1b94b0165512a33552
[Dexter] Improve performance by evaluating expressions only when needed

Currently, Dexter's model for fetching watch values is to build a list of
expressions to watch before running the debugger, then evaluating all of them at
each breakpoint, then finally looking up the values of these expressions at each
line they were expected on. When using dexter on a large project while watching
many different expressions, this is very slow, as Dexter will make a massive
number of calls made to the debugger's API, the vast majority of which are not
being used for anything. This patch fixes this issue by having Dexter only
evaluate expressions at a breakpoint when it will be used by a Dexter command.

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D107070
cross-project-tests/debuginfo-tests/dexter/dex/command/CommandBase.py
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectProgramState.py
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py