diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 15:34:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 15:34:24 +0300 |
commit | b951fc4e7f0d81df070f14655a5b7351bc6b0871 (patch) | |
tree | 239e007e9a262ac1d48ba2adfa284d109ba9efce /storage/innobase/ut | |
parent | 33215edcbaa84d2fa33a0c8358a16dc3aec4a6ee (diff) | |
parent | 8fb39b2c35e991f22911a88cb66ac4aef12eb5a5 (diff) | |
download | mariadb-git-b951fc4e7f0d81df070f14655a5b7351bc6b0871.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/ut')
-rw-r--r-- | storage/innobase/ut/ut0crc32.cc | 17 | ||||
-rw-r--r-- | storage/innobase/ut/ut0ut.cc | 30 |
2 files changed, 1 insertions, 46 deletions
diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc index 5a7698bbf79..13850a48600 100644 --- a/storage/innobase/ut/ut0crc32.cc +++ b/storage/innobase/ut/ut0crc32.cc @@ -618,23 +618,6 @@ ut_crc32_init() ut_cpuid(vend, &model, &family, &stepping, &features_ecx, &features_edx); - /* Valgrind does not understand the CRC32 instructions: - - vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x38 0xF0 0xA - valgrind: Unrecognised instruction at address 0xad3db5. - Your program just tried to execute an instruction that Valgrind - did not recognise. There are two possible reasons for this. - 1. Your program has a bug and erroneously jumped to a non-code - location. If you are running Memcheck and you just saw a - warning about a bad jump, it's probably your program's fault. - 2. The instruction is legitimate but Valgrind doesn't handle it, - i.e. it's Valgrind's fault. If you think this is the case or - you are not sure, please let us know and we'll try to fix it. - Either way, Valgrind will now raise a SIGILL signal which will - probably kill your program. - - */ - if (features_ecx & 1 << 20) { ut_crc32 = ut_crc32_hw; #ifdef INNODB_BUG_ENDIAN_CRC32 diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index 42054f309c7..de12ab0cc11 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -146,30 +146,6 @@ ut_usectime( } /**********************************************************//** -Returns the number of microseconds since epoch. Similar to -time(3), the return value is also stored in *tloc, provided -that tloc is non-NULL. -@return us since epoch */ -uintmax_t -ut_time_us( -/*=======*/ - uintmax_t* tloc) /*!< out: us since epoch, if non-NULL */ -{ - struct timeval tv; - uintmax_t us; - - ut_gettimeofday(&tv, NULL); - - us = uintmax_t(tv.tv_sec) * 1000000 + uintmax_t(tv.tv_usec); - - if (tloc != NULL) { - *tloc = us; - } - - return(us); -} - -/**********************************************************//** Returns the number of milliseconds since some epoch. The value may wrap around. It should only be used for heuristic purposes. @@ -178,11 +154,7 @@ ulint ut_time_ms(void) /*============*/ { - struct timeval tv; - - ut_gettimeofday(&tv, NULL); - - return(ulint(tv.tv_sec) * 1000 + ulint(tv.tv_usec / 1000)); + return static_cast<ulint>(my_interval_timer() / 1000000); } /**********************************************************//** |