This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Allow logging the first argument of a function call.
ClosedPublic

Authored by pelikan on Feb 7 2017, 9:46 PM.

Details

Summary

Functions with the "xray-log-args" attribute will have a special XRay sled kind
emitted, for compiler-rt to copy any call arguments to your logging handler.

For practical and performance reasons, only the first argument is supported, and
only up to 64 bits.

Event Timeline

pelikan created this revision.Feb 7 2017, 9:46 PM
dberris requested changes to this revision.Feb 9 2017, 12:16 AM
dberris added inline comments.
include/llvm/CodeGen/AsmPrinter.h
203–204

As mentioned elsewhere, please use 3.

This revision now requires changes to proceed.Feb 9 2017, 12:16 AM
pelikan updated this revision to Diff 90430.Mar 2 2017, 9:31 PM
pelikan edited edge metadata.
pelikan marked an inline comment as done.
  • change the number back
pelikan updated this revision to Diff 90434.Mar 3 2017, 12:01 AM
  • fix the number in the test too
dberris accepted this revision.Mar 3 2017, 12:34 AM

LGTM

This revision is now accepted and ready to land.Mar 3 2017, 12:34 AM
pelikan updated this revision to Diff 90439.Mar 3 2017, 1:22 AM
  • fix test on x86_64-darwin-unknown (I had no idea this was enabled)
This revision was automatically updated to reflect the committed changes.