[all-commits] [llvm/llvm-project] 59237b: [lldb] Use a time-based timeout in IRInterpreter
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Tue Aug 1 10:51:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59237bb52c9483fce395428bfab5996eabe54ed0
https://github.com/llvm/llvm-project/commit/59237bb52c9483fce395428bfab5996eabe54ed0
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M lldb/include/lldb/Expression/IRInterpreter.h
M lldb/include/lldb/Target/Target.h
M lldb/source/Expression/IRInterpreter.cpp
M lldb/source/Expression/LLVMUserExpression.cpp
M lldb/test/API/commands/expression/ir-interpreter/TestIRInterpreter.py
Log Message:
-----------
[lldb] Use a time-based timeout in IRInterpreter
At the moment the IRInterpreter will stop interpreting an expression
after a hardcoded 4096 instructions. After it reaches the limit it will
stop interpreting and leave the process in whatever state it was when
the timeout was reached.
This patch changes the instruction limit to a timeout and uses the
user-specified expression timeout value for this. The main motivation is
to allow users on targets where we can't use the JIT to run more
complicated expressions if they really want to (which they can do now by
just increasing the timeout).
The time-based approach also seems much more meaningful than the
arbitrary (and very low) instruction limit. 4096 instructions can be
interpreted in a few microseconds on some setups but might take much
longer if we have a slow connection to the target. I don't think any
user actually cares about the number of instructions that are executed
but only about the time they are willing to wait for a result.
Based off an original patch by Raphael Isemann.
Differential revision: https://reviews.llvm.org/D102762
More information about the All-commits
mailing list