[XRay] Use more portable control block
authorDean Michael Berris <dberris@google.com>
Mon, 29 Oct 2018 02:18:14 +0000 (02:18 +0000)
committerDean Michael Berris <dberris@google.com>
Mon, 29 Oct 2018 02:18:14 +0000 (02:18 +0000)
commit36d9746630fd4fb71fef627057fdd5b899cfd221
treef8d8c5c09d763e15a4f84f75dd7e0fe04473e06b
parent42aa87143d0ce47ddcba5eab82c4a66b76b7b2dd
[XRay] Use more portable control block

Summary:
In D53560, we assumed a specific layout for memory without using an
explicit structure. This follow-up change uses more portable layout
control by using unions in a struct, and consolidating the memory
management code in the buffer queue.

We also take the opportunity to improve the documentation on the types
and operations, along with simplifying some of the logic in the buffer
queue implementation.

Reviewers: mboerger, eizan

Subscribers: jfb, llvm-commits

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

llvm-svn: 345485
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