[all-commits] [llvm/llvm-project] b3f148: [Dexter] Optimize breakpoint deletion in Visual St...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Tue Mar 1 05:14:12 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b3f1480204e33865ea47363224a50280b870559b
https://github.com/llvm/llvm-project/commit/b3f1480204e33865ea47363224a50280b870559b
Author: gbtozers <stephen.tozer at sony.com>
Date: 2022-03-01 (Tue, 01 Mar 2022)
Changed paths:
M cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
M cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py
M cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
M cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
M cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
Log Message:
-----------
[Dexter] Optimize breakpoint deletion in Visual Studio
Breakpoint deletion in visual studio is currently implemented by
iterating over the breakpoints we want to delete, for each of which we
iterate over the complete set of breakpoints in the debugger instance
until we find the one we wish to delete. Ideally we would resolve this
by directly deleting each breakpoint by some ID rather than searching
through the full breakpoint list for them, but in the absence of such a
feature in VS we can instead invert the loop to improve performance.
This patch changes breakpoint deletion to iterate over the complete list
of breakpoints, deleting breakpoints that match the breakpoints we
expect to delete by checking set membership. This represents a
worst-case improvement from O(nm) to O(n), for 'm' breakpoints being
deleted out of 'n' total. In practise this is almost exactly 'm'-times
faster, as when we delete multiple breakpoints they are typically
adjacent in the full breakpoint list.
Differential Revision: https://reviews.llvm.org/D120658
More information about the All-commits
mailing list