-C Turn\smemory\sstatus\soff\sby\sdefault.
-D 2016-07-29T16:32:34.995
+C A\snew\sversion\sof\sthe\sslow\smutex\slog\sthat\suses\sgettimeofday()\sinstead\sof\ntrying\sto\saccess\sthe\shardware\stimer.
+D 2016-07-30T03:33:30.306
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/mutex.c 84a073c9a23a8d7bdd2ea832522d1730df18812c
F src/mutex.h 779d588e3b7756ec3ecf7d78cde1d84aba414f85
F src/mutex_noop.c f3f09fd7a2eb4287cfc799753ffc30380e7b71a1
-F src/mutex_unix.c 3a24b5f2e46c3a676606a28ac5d00c0462231f98
+F src/mutex_unix.c 5cbf63bc6e2999eecbcfa883537c9eacf1484a62
F src/mutex_w32.c 06bfff9a3a83b53389a51a967643db3967032e1e
F src/notify.c 9711a7575036f0d3040ba61bc6e217f13a9888e7
F src/os.c 1b147e4cf7cc39e618115c14a086aed44bc91ace
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e60cb6d8852ebf42659c7f2e86a1f6a2492b4664
-R 2e00b38dde15987fc42ae9a66ffe8ce5
+P ea3c7162dc79cb85868d2bc86d9938fe7c2ae7ef
+R 4317055374b4abe2abea36440aabee15
U drh
-Z 8a353085af5bf0ee7487739267eafd01
+Z d3037cc2511d419210d869068053f9a1
-ea3c7162dc79cb85868d2bc86d9938fe7c2ae7ef
\ No newline at end of file
+92b9fead353d50eb41f5ab7e3a887dd4e5c3aa80
\ No newline at end of file
sqlite3_free(p);
}
-#include "hwtime.h"
+#include <sys/time.h>
#ifdef SQLITE_MUTEX_NREF
# define MUTEX_ID(p) (p->id)
#else
** more than once, the behavior is undefined.
*/
static void pthreadMutexEnter(sqlite3_mutex *p){
- sqlite3_uint64 iTimer = sqlite3Hwtime();
+ struct timeval x;
+ sqlite3_uint64 iBegin, iEnd;
assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );
+ gettimeofday(&x, 0);
+ iBegin = 1000000*(sqlite3_uint64)x.tv_sec + x.tv_usec;
#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
/* If recursive mutexes are not available, then we have to grow
** our own. This implementation assumes that pthread_equal()
p->owner = pthread_self();
p->nRef++;
#endif
- iTimer = sqlite3Hwtime() - iTimer;
- if( iTimer>100000 ){
+ gettimeofday(&x, 0);
+ iEnd = 1000000*(sqlite3_uint64)x.tv_sec + x.tv_usec;
+ if( iEnd > iBegin+500 ){
sqlite3_mutex *pMaster = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
int id = -1;
if( p>=pMaster && p<=&pMaster[SQLITE_MUTEX_STATIC_APP3-2] ){
id = (int)(p - pMaster) + 2;
}
- sqlite3_log(SQLITE_NOTICE, "slow mutex: %lld cycles on %d/%p",
- iTimer, id, p);
+ sqlite3_log(SQLITE_NOTICE, "slow mutex: %llu uS on %d/%p",
+ iEnd - iBegin, id, p);
}
#endif