This is an archive of the discontinued LLVM Phabricator instance.

[XRay][compiler-rt] Add support for TSC emulation for x86_64 to xray_fdr_logging.cc
ClosedPublic

Authored by dyung on Apr 10 2017, 3:07 PM.

Details

Summary

Previously in r297800, a work-around was created to use TSC emulation on x86_64 when RDTSCP was not available on the host. A similar change was needed in the file xray_fdr_logging.cc which this patch ports over to that file.

Eventually the code should be refactored as there will be 3 locations with the same code, but that can be done as a separate step. This patch is just to keep the test from failing on my machine due to an illegal instruction since RDTSCP is not available on my x86_64 linux VM.

Diff Detail

Repository
rL LLVM

Event Timeline

dyung created this revision.Apr 10 2017, 3:07 PM
dberris accepted this revision.Apr 10 2017, 8:43 PM

LGTM

lib/xray/xray_fdr_logging.cc
199 ↗(On Diff #94748)

Probably want to put a //FIXME: here indicating that this needs some refactoring later on.

This revision is now accepted and ready to land.Apr 10 2017, 8:43 PM
This revision was automatically updated to reflect the committed changes.