forked from OSchip/llvm-project
d06e917b9e
Summary: This change removes the dependency on using a std::deque<...> for the storage of the buffers in the buffer queue. We instead implement a fixed-size circular buffer that's resilient to exhaustion, and preserves the semantics of the BufferQueue. We're moving away from using std::deque<...> for two reasons: - We want to remove dependencies on the STL for data structures. - We want the data structure we use to not require re-allocation in the normal course of operation. The internal implementation of the buffer queue uses heap-allocated arrays that are initialized once when the BufferQueue is created, and re-uses slots in the buffer array as buffers are returned in order. We also change the lock used in the implementation to a spinlock instead of a blocking mutex. We reason that since the release operations now take very little time in the critical section, that a spinlock would be appropriate. This change is related to D38073. This change is a re-submit with the following changes: - Keeping track of the live buffers with a counter independent of the pointers keeping track of the extents of the circular buffer. - Additional documentation of what the data members are meant to represent. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38119 llvm-svn: 314877 |
||
---|---|---|
.. | ||
always-never-instrument.cc | ||
arg1-arg0-logging.cc | ||
arg1-logger.cc | ||
arg1-logging-implicit-this.cc | ||
argv0-log-file-name.cc | ||
coverage-sample.cc | ||
custom-event-handler-alignment.cc | ||
custom-event-logging.cc | ||
fdr-mode.cc | ||
fdr-single-thread.cc | ||
fdr-thread-order.cc | ||
fixedsize-logging.cc | ||
func-id-utils.cc | ||
optional-inmemory-log.cc | ||
patching-unpatching.cc | ||
pic_test.cc | ||
quiet-start.cc |