fix-cycles-arch
authorCeph Maintainers <ceph-maintainers@lists.ceph.com>
Sun, 30 Jul 2017 09:48:17 +0000 (10:48 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Sun, 30 Jul 2017 09:48:17 +0000 (10:48 +0100)
Gbp-Pq: Name fix-cycles-arch.patch

src/common/Cycles.cc

index 656f08b40ceeab8a7a51225bee8e63ef833ce6f8..4d04eed9e98be6bedd800f3ecb6b29b7dd5282d1 100644 (file)
@@ -57,6 +57,10 @@ void Cycles::init()
   if (rdtsc() == 0)
     return;
 
+  // Skip initialization if rtdsc is not implemented
+  if (rdtsc() == 0)
+    return;
+
   // Compute the frequency of the fine-grained CPU timer: to do this,
   // take parallel time readings using both rdtsc and gettimeofday.
   // After 10ms have elapsed, take the ratio between these readings.