[XRay][compiler-rt] Generational Buffer Management
authorDean Michael Berris <dberris@google.com>
Wed, 17 Oct 2018 06:57:50 +0000 (06:57 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 17 Oct 2018 06:57:50 +0000 (06:57 +0000)
commite85af163bcb54f7510f2bd582f749f0d1505ff9b
treebb3e39506ea371ed410861663da9b5a891ed8291
parentc5f1d215a266710e6cec204bf45a1d77183f2390
[XRay][compiler-rt] Generational Buffer Management

Summary:
This change updates the buffer queue implementation to support using a
generation number to identify the lifetime of buffers. This first part
introduces the notion of the generation number, without changing the way
we handle the buffers yet.

What's missing here is the cleanup of the buffers. Ideally we'll keep
the two most recent generations. We need to ensure that before we do any
writes to the buffers, that we check the generation number(s) first.

Those changes will follow-on from this change.

Depends on D52588.

Reviewers: mboerger, eizan

Subscribers: llvm-commits, jfb

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

llvm-svn: 344670
compiler-rt/lib/xray/tests/unit/buffer_queue_test.cc
compiler-rt/lib/xray/xray_buffer_queue.cc
compiler-rt/lib/xray/xray_buffer_queue.h
compiler-rt/lib/xray/xray_fdr_logging.cc