Files
Khem Raj 514610e78d rocksdb: Upgrade to 7.5.3 release
Drop upstreamed patches and forward port existing ones

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-09-11 20:42:05 -07:00

19 lines
737 B
Diff

implement timer implementation for mips platform
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h
@@ -158,6 +158,12 @@ static inline tokutime_t toku_time_now(v
uint64_t cycles;
asm volatile("rdcycle %0" : "=r"(cycles));
return cycles;
+#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;
#else
#error No timer implementation for this platform
#endif