Bug 988463 - Add in support for tracelogging on ARM. r=h4writer
authorMarty Rosenberg <mrosenberg@mozilla.com>
Fri, 26 Jun 2015 11:52:50 -0700
changeset 250340 330289920bd3919a9987722b1ab3a840ec2f0da2
parent 250339 f68aef04ed94dda40bdf77731470791d64f81fc5
child 250341 fbcedabfb8f58e38a2096281eb50b78d8f4e8c49
push id61520
push usersean.stangl@gmail.com
push dateFri, 26 Jun 2015 18:53:05 +0000
treeherdermozilla-inbound@330289920bd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs988463
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 988463 - Add in support for tracelogging on ARM. r=h4writer
js/src/vm/TraceLogging.cpp
--- a/js/src/vm/TraceLogging.cpp
+++ b/js/src/vm/TraceLogging.cpp
@@ -68,16 +68,28 @@ rdtsc(void)
             : "=r"(upper),"=r"(lower),"=r"(tmp)
             );
     result = upper;
     result = result<<32;
     result = result|lower;
 
     return result;
 }
+#elif defined(__arm__)
+#include <sys/time.h>
+static __inline__ uint64_t
+rdtsc(void)
+{
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+    uint64_t ret = tv.tv_sec;
+    ret *= 1000000;
+    ret += tv.tv_usec;
+    return ret;
+}
 #else
 static __inline__ uint64_t
 rdtsc(void)
 {
     return 0;
 }
 #endif