[PATCH] D39526: [XRay] Use optimistic logging model for FDR mode

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 5 19:16:26 PST 2017


dberris planned changes to this revision.
dberris added a comment.

Actually, I just realised there's an issue with this approach -- I may need to ensure that the `size_t` being written doesn't straddle a cache line so that partial writes couldn't cause the thread reading the data to see an incorrect value of the extents. My options for fixing this are:

- Attaching additional metadata to the Buffer type, that's cache-line aligned instead of using the metadata record in the buffer that's character-aligned.
- Create a dedicated section in the Buffer that's treated as metadata, and is guaranteed cache-aligned. This will mean that we use an aligning allocator (posix_memalign perhaps) to get a suitably-aligned metadata section (buffer header?) that gets updated with the useful data about the buffer.

I'll think about this a little more, and update with a more correct solution.


https://reviews.llvm.org/D39526





More information about the llvm-commits mailing list