This is an archive of the discontinued LLVM Phabricator instance.

[XRay][compiler-rt] Support string-based config for Basic mode.
ClosedPublic

Authored by dberris on Apr 30 2018, 12:57 AM.

Details

Summary

This addresses http://llvm.org/PR36790.

This change allows the XRay Basic Mode implementation to use the
string-based initialization routine provided through
__xray_log_init_mode(...). In the process, we've also deprecated some
flags defined for the XRAY_OPTIONS environment variable.

We then introduce another environment variable that can control the XRay
Basic Mode implementation through XRAY_BASIC_OPTIONS.

We also rename files from xray_inmemory_log to xray_basic_logging to
be more in line with the mode implementation.

Depends on D46174.

Diff Detail

Event Timeline

dberris created this revision.Apr 30 2018, 12:57 AM
kpw accepted this revision.May 3 2018, 8:28 PM
kpw added inline comments.
compiler-rt/lib/xray/xray_basic_flags.cc
25 ↗(On Diff #144509)

Can you make this a Doxygen comment?

compiler-rt/lib/xray/xray_basic_logging.cc
400 ↗(On Diff #144509)

Shoudn't this be != 0? Override the defaults if XRAY_BASIC_OPTIONS was not empty?

This revision is now accepted and ready to land.May 3 2018, 8:28 PM
dberris updated this revision to Diff 145148.May 3 2018, 9:53 PM
dberris marked 2 inline comments as done.
  • fixup: address comments by kpw
compiler-rt/lib/xray/xray_basic_logging.cc
400 ↗(On Diff #144509)

No, what we want to do is to use the "global" version (ones defined in XRAY_OPTIONS) only if XRAY_BASIC_OPTIONS wasn't defined. Added a comment.

This revision was automatically updated to reflect the committed changes.
Herald added a subscriber: Restricted Project. · View Herald TranscriptMay 3 2018, 11:31 PM
lib/xray/xray_flags.inc