[XRay][compiler-rt] XRay Buffer Queue
authorDean Michael Berris <dberris@google.com>
Fri, 25 Nov 2016 03:14:10 +0000 (03:14 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 25 Nov 2016 03:14:10 +0000 (03:14 +0000)
commit47119579c88d27adcdcb14bc8675d62ca5cc8e67
treed86c2444457c9cb5e627292fdb857550f3ee15a6
parentd4091494d30bebaaddd82de2715754df2dbd3bcd
[XRay][compiler-rt] XRay Buffer Queue

Summary:
This implements a simple buffer queue to manage a pre-allocated queue of
fixed-sized buffers to hold XRay records. We need this to support
Flight Data Recorder (FDR) mode. We also implement this as a sub-library
first to allow for development before actually using it in an
implementation.

Some important properties of the buffer queue:

- Thread-safe enqueueing/dequeueing of fixed-size buffers.
- Pre-allocation of buffers at construction.

Reviewers: majnemer, rSerge, echristo

Subscribers: mehdi_amini, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D26232

llvm-svn: 287910
compiler-rt/lib/xray/CMakeLists.txt
compiler-rt/lib/xray/tests/CMakeLists.txt [new file with mode: 0644]
compiler-rt/lib/xray/tests/unit/CMakeLists.txt [new file with mode: 0644]
compiler-rt/lib/xray/tests/unit/buffer_queue_test.cc [new file with mode: 0644]
compiler-rt/lib/xray/tests/unit/xray_unit_test_main.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_buffer_queue.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_buffer_queue.h [new file with mode: 0644]
compiler-rt/test/xray/CMakeLists.txt
compiler-rt/test/xray/Unit/lit.site.cfg.in [new file with mode: 0644]