Description
Couchbase build fails with error "#error You need to define CycleTimer for your OS and CPU" as CycleTimer is undefined and needs to be set for s390x architecture.
Attached is the change required to set CyclerTimer for s390x.
File couchbase/benchmark/src/cycleclock.h needs to be changes as below:
@@ -82,6 +82,10 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
uint64_t low, high;
_asm_ volatile("rdtsc" : "=a"(low), "=d"(high));
return (high << 32) | low;
+#elif defined(_s390x_)
+ uint64_t res;
+ _asm_ volatile("stck %0" : "=m"(res));
+ return res;
#elif defined(_powerpc) || defined(ppc_)
// This returns a time-base, which is not always precisely a cycle-count.
int64_t tbl, tbu0, tbu1;