Use TSC emulation in cases where RDTSCP isn't available on the host
running an XRay instrumented binary. We can then fall back into
emulation instead of not even installing XRay's runtime functionality.
We only do this for now in the naive/basic logging implementation, but
should be useful in even FDR mode.
Should fix http://llvm.org/PR32148.
This lambda is already in xray_tsc.h as ALWAYS_INLINE. I remember the discussion about how important it is to have it inlined, and here it's a copy+paste lambda with unclear inliner results. Why can't we just use the readTSC function pointer here?
In that case we'll have to rename it to something like emulateTSC and move out of the #elif, as (in this case) readTSC is a real thing reading the real TSC. And then even the other architectures' code would look clearer, because they *emulate* TSC, not *read* it. Intel and Power would call "read" and others would call "emulate".