This is an archive of the discontinued LLVM Phabricator instance.

[XRay][compiler-rt] Handle tail-call exits in the XRay runtime
ClosedPublic

Authored by dberris on Sep 17 2017, 9:37 PM.

Details

Summary

This change starts differentiating tail exits from normal exits. We also
increase the version number of the "naive" log to version 2, which will
be the starting version where these records start appearing. In FDR mode
we treat the tail exits as normal exits, and are thus subject to the
same treatment with regard to record unwriting.

Updating the version number is important to signal older builds of the
llvm-xray tool that do not deal with the tail exit records must fail
early (and that users should only use the llvm-xray tool built after
the support for tail exits to get accurate handling of these records).

Depends on D37964.

Diff Detail

Repository
rL LLVM

Event Timeline

dberris created this revision.Sep 17 2017, 9:37 PM
pelikan accepted this revision.Sep 17 2017, 9:53 PM

I don't understand why do we need the version number bumped but I'm guessing you'll show me a counter-example in response to this comment.

This revision is now accepted and ready to land.Sep 17 2017, 9:53 PM

I don't understand why do we need the version number bumped but I'm guessing you'll show me a counter-example in response to this comment.

Right, apologies if it wasn't too clear.

This one is a matter of non-backwards compatibility. We're using the version number in the log to indicate that older versions of the llvm-xray tools aren't expected to handle this version of the log (because we write new kinds of records here). This makes it so that when the previously built/released version of the llvm-xray tool is used on a newer version of the log, the older built tool will fail immediately on an unknown version.

I'll update the description to explain this a bit more.

dberris updated this revision to Diff 115598.Sep 17 2017, 11:17 PM
dberris edited the summary of this revision. (Show Details)

Reword description.

This revision was automatically updated to reflect the committed changes.