summaryrefslogtreecommitdiff
path: root/lib/xray/xray_arm.cc
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2016-12-19 12:43:08 +0000
committerDiana Picus <diana.picus@linaro.org>2016-12-19 12:43:08 +0000
commit1b9e1ee0c7a5a30d1621e3409d21871140cbc049 (patch)
tree7544bbecb7d547a3a60419caac7dc88e687746c1 /lib/xray/xray_arm.cc
parent769c2c7be646091ca003605c6dde6747c92f73e8 (diff)
Revert "[XRay] [compiler-rt] Move machine-dependent code into machine-dependent files."
This reverts commit r290077, 78, 79 and 83. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@290101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/xray/xray_arm.cc')
-rw-r--r--lib/xray/xray_arm.cc14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/xray/xray_arm.cc b/lib/xray/xray_arm.cc
index d89322e83..9ce8451be 100644
--- a/lib/xray/xray_arm.cc
+++ b/lib/xray/xray_arm.cc
@@ -14,26 +14,12 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_common.h"
#include "xray_defs.h"
-#include "xray_emulate_tsc.h"
#include "xray_interface_internal.h"
#include <atomic>
#include <cassert>
namespace __xray {
-uint64_t cycleFrequency() XRAY_NEVER_INSTRUMENT {
- // There is no instruction like RDTSCP in user mode on ARM. ARM's CP15 does
- // not have a constant frequency like TSC on x86[_64]; it may go faster or
- // slower depending on CPU's turbo or power saving modes. Furthermore, to
- // read from CP15 on ARM a kernel modification or a driver is needed.
- // We can not require this from users of compiler-rt.
- // So on ARM we use clock_gettime(2) which gives the result in nanoseconds.
- // To get the measurements per second, we scale this by the number of
- // nanoseconds per second, pretending that the TSC frequency is 1GHz and
- // one TSC tick is 1 nanosecond.
- return NanosecondsPerSecond;
-}
-
// The machine codes for some instructions used in runtime patching.
enum class PatchOpcodes : uint32_t {
PO_PushR0Lr = 0xE92D4001, // PUSH {r0, lr}