[Lldb-commits] [PATCH] Improve stability of ProcessMonitor -- use a thread-safe queue instead of file descriptors with unchecked read/write calls to transfer Operation* between threads.

Daniel Malea daniel.malea at intel.com
Fri Sep 13 15:25:19 PDT 2013


This commit simplifies the Linux ProcessMonitor:
- DoOperation() and ServeOperation() no longer depend on file descriptors!
- remove EnableIPC() helper. ProcessMonitor will not have to run as a separate process.
- added a semaphore to signal when an operation is complete (previously signaling happened through a file descriptor)
- under heavy stress tests (i.e. running tests while compiling) we noticed that the previous ProcessMonitor implementation would break because the read/write
  calls were not error-checked, causing LLDB to hang.

Add lldb_private::Queue class:
- implemented on top of lldb's Mutex and Condition classes
- supports pop(), push() and empty() from multiple threads

http://llvm-reviews.chandlerc.com/D1682

Files:
  include/lldb/Host/Queue.h
  source/Plugins/Process/Linux/ProcessMonitor.cpp
  source/Plugins/Process/Linux/ProcessMonitor.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1682.1.patch
Type: text/x-patch
Size: 8719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20130913/d707cbe4/attachment.bin>


More information about the lldb-commits mailing list