From 1b9e1ee0c7a5a30d1621e3409d21871140cbc049 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Mon, 19 Dec 2016 12:43:08 +0000 Subject: 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 --- lib/xray/xray_arm.cc | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lib/xray/xray_arm.cc') 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 #include 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} -- cgit v1.2.3