This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][XRay] Address follow-up comments to initial interface and initialisation code
ClosedPublic

Authored by dberris on Jul 28 2016, 3:59 AM.

Details

Summary

This addresses some comments from D21612, which contains the following changes:

  • Update xray_patch() and xray_unpatch() API documentation to not imply asynchrony.
  • Introduce a scope cleanup mechanism to make sure we can roll-back changes to the XRayPatching global atomic.
  • Introduce a few more comments for potential extension points for other platforms (for the implementation details of patching and un-patching).

Diff Detail

Repository
rL LLVM

Event Timeline

dberris updated this revision to Diff 65905.Jul 28 2016, 3:59 AM
dberris retitled this revision from to [compiler-rt][XRay] Address follow-up comments to initial interface and initialisation code.
dberris updated this object.
dberris added reviewers: eugenis, rnk, kcc, echristo, majnemer.
dberris added a subscriber: llvm-commits.
eugenis accepted this revision.Jul 28 2016, 2:39 PM
eugenis edited edge metadata.
eugenis added inline comments.
lib/xray/xray_init.cc
35 ↗(On Diff #65905)

This only works for the main executable, right? Is this a temporary limitation? I imagine you could emit constructors to all DSOs that would add per-DSO sled maps to the global list.

This revision is now accepted and ready to land.Jul 28 2016, 2:39 PM
dberris updated this revision to Diff 66088.Jul 29 2016, 12:16 AM
dberris marked an inline comment as done.
dberris edited edge metadata.
  • Add FIXME for supporting instrumentation maps in DSOs
lib/xray/xray_init.cc
35 ↗(On Diff #65905)

Currently, yes. I haven't quite thought out a solution for DSO's as it hasn't come up yet.

But as you mention, yes we can do something special for DSO's that would be treated especially by the runtime. I've added a FIXME to indicate that.

This revision was automatically updated to reflect the committed changes.