aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-08-05 14:49:15 -0500
committerGitHub <noreply@github.com>2024-08-05 14:49:15 -0500
commitd1b294029004e7c3220ed46e2b06addd32490745 (patch)
tree823b33c5eefa4a8a768e23fca5b869efca576fbb /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parentc469540010af60c2e3d19d40f1ead16489176e21 (diff)
downloadllvm-d1b294029004e7c3220ed46e2b06addd32490745.zip
llvm-d1b294029004e7c3220ed46e2b06addd32490745.tar.gz
llvm-d1b294029004e7c3220ed46e2b06addd32490745.tar.bz2
[libc] Add loader option to force serial execution of GPU region (#101601)
Summary: The loader is used as a test utility to run traditionally CPU based unit tests on the GPU. This has issues when used with something like `llvm-lit` because the GPU runtimes have a nasty habit of either running out of resources or hanging when they are overloaded. To combat this, I added this option to force each process to perform the GPU part serially. This is done right now with a simple file lock on the executing file. I was originally thinking about using more complex IPC to allow N processes to share execution, but that seemed overly complicated given the incredibly large number of failure modes it introduces. File locks are nice here because if the process crashes or is killed it will release the lock automatically (at least on Linux). This is in contrast to something like POSIX shared memory which will stick around until it's unlinked, meaning that if someone did `sigkill` on the program it would never get cleaned up and other threads might wait on a mutex that never occurs. Restricting this to one thread isn't overly ideal, given the fact that the runtime can likely handle at least a *few* separate processes, but this was easy and it works, so might as well start here. This will hopefully unblock me on running `libcxx` tests, as those ran with so much parallelism spurious failures were very common.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
0 files changed, 0 insertions, 0 deletions