This is an archive of the discontinued LLVM Phabricator instance.

[XRay] Bug fixes for FDR custom event and arg-logging
ClosedPublic

Authored by dberris on Sep 12 2018, 12:20 AM.

Details

Summary

This change has a number of fixes for FDR mode in compiler-rt along with
changes to the tooling handling the traces in llvm.

In the runtime, we do the following:

  • Advance the "last record" pointer appropriately when writing the custom event data in the log.
  • Add XRAY_NEVER_INSTRUMENT in the rewinding routine.
  • When collecting the argument of functions appropriately marked, we should not attempt to rewind them (and reset the counts of functions that can be re-wound).

In the tooling, we do the following:

  • Remove the state logic in BlockIndexer and instead rely on the presence/absence of records to indicate blocks.
  • Move the verifier into a loop associated with each block.

Event Timeline

dberris created this revision.Sep 12 2018, 12:20 AM
dberris updated this revision to Diff 165014.Sep 12 2018, 12:21 AM
dberris retitled this revision from reword: cleanup logic in fdr logging to [XRay] Bug fixes for FDR custom event and arg-logging.
dberris edited the summary of this revision. (Show Details)

Retitle, update.

mboerger added inline comments.Sep 12 2018, 12:35 AM
compiler-rt/lib/xray/xray_fdr_logging.cc
293

Put the formula on one line and maybe state that the number is 0x0FFFFFFFF

623

what about the 'second'

dberris updated this revision to Diff 165072.Sep 12 2018, 6:38 AM
dberris marked an inline comment as done.

Address comments by @mboerger.

dberris marked an inline comment as done.Sep 12 2018, 6:38 AM
dberris updated this revision to Diff 165079.Sep 12 2018, 7:15 AM

0xfff... -> 0x0fff...

This revision is now accepted and ready to land.Sep 13 2018, 1:56 AM
This revision was automatically updated to reflect the committed changes.