This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Simplify FDR buffer management
ClosedPublic

Authored by dberris on Sep 14 2018, 12:52 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

dberris created this revision.Sep 14 2018, 12:52 AM
This revision is now accepted and ready to land.Sep 14 2018, 8:00 AM
This revision was automatically updated to reflect the committed changes.