Page MenuHomePhabricator

[XRay] Update XRayRecord to support Custom/Typed Events
ClosedPublic

Authored by dberris on Nov 5 2018, 9:41 PM.

Details

Summary

This change cuts across LLVM and compiler-rt to add support for
rendering custom events in the XRayRecord type, to allow for including
user-provided annotations in the output YAML (as raw bytes).

This work enables us to add custom event and typed event records into
the llvm::xray::Trace type for user-provided events. This can then be
programmatically handled through the C++ API and can be included in some
of the tooling as well. For now we support printing the raw data we
encounter in the custom events in the converted output.

Future work will allow us to start interpreting these custom and typed
events through a yet-to-be-defined API for extending the trace analysis
library.

Diff Detail

Repository
rL LLVM

Event Timeline

dberris created this revision.Nov 5 2018, 9:41 PM
mboerger added inline comments.Nov 5 2018, 10:59 PM
llvm/include/llvm/XRay/XRayRecord.h
68 ↗(On Diff #172710)

...higher-level event-log.

70 ↗(On Diff #172710)

Please clarify how RecordType and Type work together. And it is sad that there is no initial enum, but that may just be me.

dberris updated this revision to Diff 172713.Nov 5 2018, 11:38 PM
dberris marked 2 inline comments as done.

Address comments, handle more cases where enum is used in tools.

This revision is now accepted and ready to land.Nov 5 2018, 11:43 PM
This revision was automatically updated to reflect the committed changes.