Source: rocksdb
Version: 9.10.0-1
Severity: normal
Hello,
the patch "mips.patch" uses a C implementation for rdtsc on MIPS targets.
Please change the patch so that the fallback implementation is used on all
architectures instead of just triggering the #error statement:
---
rocksdb-9.10.0.orig/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
+++
rocksdb-9.10.0/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
@@ -166,12 +166,6 @@ static inline tokutime_t toku_time_now(v
unsigned long result;
asm volatile ("rdtime.d\t%0,$r0" : "=r" (result));
return result;
-#elif defined(__mips__)
- // mips apparently only allows rdtsc for superusers, so we fall
- // back to gettimeofday. It's possible clock_gettime would be better.
- struct timeval tv;
- gettimeofday(&tv, nullptr);
- return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
#elif (__ARM_ARCH >= 6)
uint32_t pmccntr;
uint32_t pmuseren;
@@ -187,7 +181,9 @@ static inline tokutime_t toku_time_now(v
}
}
#else
-#error No timer implementation for this platform
+ struct timeval tv;
+ gettimeofday(&tv, nullptr);
+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec;
#endif
}
Then rocksdb can be build-enabled for all targets.
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913