aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/NativeProcessProtocol.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2023-03-27 17:39:55 +0200
committerPavel Labath <pavel@labath.sk>2023-03-30 12:48:36 +0200
commite64cc756819d567f453467bf7cc16599ad296fdd (patch)
treeddfe6ab160305b480a903405528675b34681a6b3 /lldb/source/Host/common/NativeProcessProtocol.cpp
parent44f0c9145c947d660b416bdad61874fd9d73bbae (diff)
downloadllvm-e64cc756819d567f453467bf7cc16599ad296fdd.zip
llvm-e64cc756819d567f453467bf7cc16599ad296fdd.tar.gz
llvm-e64cc756819d567f453467bf7cc16599ad296fdd.tar.bz2
[lldb-server/linux] Use waitpid(-1) to collect inferior events
This is a follow-up to D116372, which had a rather unfortunate side effect of making the processing of a single SIGCHLD quadratic in the number of threads -- which does not matter for simple applications, but can get really bad for applications with thousands of threads. This patch fixes the problem by implementing the other possibility mentioned in the first patch -- doing waitpid(-1) centrally and then routing the events to the correct process instance. The "uncollected" threads are held in the process factory class -- which I've renamed to Manager for this purpose, as it now does more than creating processes. Differential Revision: https://reviews.llvm.org/D146977
Diffstat (limited to 'lldb/source/Host/common/NativeProcessProtocol.cpp')
-rw-r--r--lldb/source/Host/common/NativeProcessProtocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp
index 975b3d0..95258e1 100644
--- a/lldb/source/Host/common/NativeProcessProtocol.cpp
+++ b/lldb/source/Host/common/NativeProcessProtocol.cpp
@@ -759,4 +759,4 @@ void NativeProcessProtocol::DoStopIDBumped(uint32_t /* newBumpId */) {
// Default implementation does nothing.
}
-NativeProcessProtocol::Factory::~Factory() = default;
+NativeProcessProtocol::Manager::~Manager() = default;