This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Encapsulate all FD log related logic into a class
ClosedPublic

Authored by phosek on Sep 16 2018, 8:56 PM.

Details

Summary

This abstracts away the file descriptor related logic which makes it
easier to port XRay to platform that don't use file descriptors or
file system for writing the log data, such as Fuchsia.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Sep 16 2018, 8:56 PM
Herald added subscribers: Restricted Project, llvm-commits, jfb. · View Herald TranscriptSep 16 2018, 8:56 PM
dberris added inline comments.Sep 16 2018, 11:53 PM
compiler-rt/lib/xray/xray_utils.cc
89–90 ↗(On Diff #165708)

Is it possible to avoid using InternalAlloc and InternalFree here, and instead use the XRay-specific allocators in xray_allocator.h (allocate<T>(...) and deallocate(...))?

phosek updated this revision to Diff 165834.Sep 17 2018, 2:36 PM
phosek marked an inline comment as done.
dberris added inline comments.Sep 17 2018, 3:58 PM
compiler-rt/lib/xray/xray_utils.cc
89–90 ↗(On Diff #165708)

Marked done but I don't see the changes -- I still see InternalAlloc and InternalFree?

phosek updated this revision to Diff 165844.Sep 17 2018, 4:23 PM
phosek added inline comments.
compiler-rt/lib/xray/xray_utils.cc
89–90 ↗(On Diff #165708)

I accidentally reuploaded the old patch, sorry about that.

dberris accepted this revision.Sep 17 2018, 4:37 PM

LGTM

This revision is now accepted and ready to land.Sep 17 2018, 4:37 PM
This revision was automatically updated to reflect the committed changes.