[PATCH] D52077: [XRay] Simplify FDR buffer management

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 00:52:52 PDT 2018


dberris created this revision.
dberris added reviewers: mboerger, eizan.
Herald added a subscriber: jfb.

This change makes XRay FDR mode use a single backing store for the
buffer queue, and have indexes into that backing store instead. We also
remove the reliance on the internal allocator implementation in the FDR
mode logging implementation.

In the process of making this change we found an inconsistency with the
way we're returning buffers to the queue, and how we're setting the
extents. We take the chance to simplify the way we're managing the
extents of each buffer. It turns out we do not need the indirection for
the extents, so we co-host the atomic 64-bit int with the buffer object.
It also seems that we've not been returning the buffers for the thread
running the flush functionality when writing out the files, so we can
run into a situation where we could be missing data.

We consolidate all the allocation routines now into xray_allocator.h,
where we used to have routines defined in xray_buffer_queue.cc.


https://reviews.llvm.org/D52077

Files:
  compiler-rt/lib/xray/xray_allocator.h
  compiler-rt/lib/xray/xray_buffer_queue.cc
  compiler-rt/lib/xray/xray_buffer_queue.h
  compiler-rt/lib/xray/xray_fdr_logging.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52077.165436.patch
Type: text/x-patch
Size: 15248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/bc453324/attachment.bin>


More information about the llvm-commits mailing list