[Lldb-commits] [lldb] [lldb/test] Add yield to spin loop in thread_filter test (PR #191025)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 8 11:16:47 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Med Ismail Bennani (medismailben)
<details>
<summary>Changes</summary>
This should fix: https://lab.llvm.org/buildbot/#/builders/211/builds/7439
The timeout might be caused by three threads busy-spinning at 100% CPU, starving the CI machine.
Add std::this_thread::yield() to the spin loop to reduce CPU pressure while keeping threads alive at a debugger-friendly location.
---
Full diff: https://github.com/llvm/llvm-project/pull/191025.diff
1 Files Affected:
- (modified) lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp (+1-1)
``````````diff
diff --git a/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp b/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
index 90dc6aee1ac27..2f73b97846619 100644
--- a/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
+++ b/lldb/test/API/functionalities/scripted_frame_provider/thread_filter/main.cpp
@@ -12,7 +12,7 @@ void thread_work() {
while (g_barrier.load() > 0)
;
while (g_spin) // break in thread
- ;
+ std::this_thread::yield();
}
int main() {
``````````
</details>
https://github.com/llvm/llvm-project/pull/191025
More information about the lldb-commits
mailing list