| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Simple search and replace. This commit doesn't touch 3rd-party files,
nor translations (where the change is not so simple and will be handled
in a separate commit).
Change-Id: I4e48513b8078a44a8cd272326685b25338890148
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit cf17b743d2fe84ab259b7232ab07b58a1872e18e, which
changed QMutex to use a Mach semaphore_t on Mac OS X. We now use
pthread_mutex_t on Mac OS X as well. Contention performance is mostly
unchanged, but the new constructionQMutex() benchmark added in this
commit shows that creating/destroying a semaphore_t is about 20 times
slower than pthread_mutex_t.
Reviewed-by: Olivier Goffart
Reviewed-by: João Abecasis
|
|
|
|
|
|
|
| |
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
| |
Benchmarks showed no benefit from RFastLock vs RSemaphore. Since
RSemaphore works on all target platforms, and RFastLock does not, there
is no benefit in using RFastLock. So to simplify the code, it is
removed.
Task-number: QTBUG-13990
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
| |
Improved documentation
Added a trywait(0) test and fixed the bug it found
Symbian implementation throws on construction fail
Task-number: QTBUG-13990
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
| |
__SYMBIAN_KERNEL_HYBRID_HEAP__ is not directly related to RFastLock's
timed wait functions, but it was added at about the right time so is
effective.
Task-number: QTBUG-13990
Reviewed-by: Shane Kearns
|
|
|
|
|
|
|
|
|
| |
QThread, QWaitCondition and QMutex have new Symbian native
implementations. These new implementations are split out into
new _symbian files.
Task-number: QTBUG-13990
Reviewed-by: Shane Kearns
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/webkit/imageanalyzer/imageanalyzer.h
examples/webkit/imageanalyzer/mainwindow.h
mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
src/corelib/io/qfsfileengine_iterator_unix.cpp
src/corelib/io/qfsfileengine_iterator_win.cpp
src/corelib/kernel/qcoreapplication.cpp
src/network/access/qnetworkaccessdatabackend.cpp
src/plugins/bearer/connman/qconnmanservice_linux.cpp
src/plugins/platforms/openvglite/qwindowsurface_vglite.h
src/s60installs/bwins/QtCoreu.def
src/s60installs/eabi/QtCoreu.def
src/s60installs/s60installs.pro
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/qdoc3/test/qt-html-templates.qdocconf
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Further observation shows that spin times slightly over the average wait time
produce the best results. This change keeps a heavily weighted average
of the wait times under 1.5ms (1.5 times the max spin threshold), and adjusts
the spin time to be 150% of the average wait time.
Introduce spin time adjustments when spin locking works, and adjust to
between 150% of the average wait time and the maximum threshold.
Reviewed-by: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the new QElapsedTimer::nsecsElapsed() and store all values in qint64
instead of int.
The maximum spin time threshold is now 1000000ns, or 1ms. Spinning for longer
than 1ms is just a waste of time, CPU, and battery.
Reviewed-by: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the adaptive spinning code to be elapsed time based instead of
iteration based. The new approach will quickly reduce the amount of
allowed spinning time when it detects that lock contention is resolved
by waiting instead of spinning. We get better results by dynamically
adjusting for elapsed running time instead of trying to fine tune
iteration counts that won't work for all CPU types, speeds, etc.
From observation, lock performance suffers if the spin time is higher
than the minimum wait time. Because of this, QMutex never increases the
spin time, it only reduces the spin time to the minimum observed wait time.
For very long wait times, we disable spinning completely (and always resolve
contention by waiting).
Use QThread::yieldCurrentThread() when spinning on a contended mutex. Comment
from the code: be a good citizen... yielding lets something else run if
there is something to run, but may also relieve memory pressure if not.
Reviewed-by: joao
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use futex(2) to implement QMutexPrivate::wait() and ::wakeup(). This
makes QMutex perform more or less identically the same as
pthread_mutex_t when contended.
We have to use the contender count in a different way due to the way
that futex() waiting works. Waiting on a futex atomically checks that
the value has not changed from the expected value and then puts the
thread to sleep. So, on Linux, the contender QAtomicInt will only ever
be one of three values: 0 for unlocked, 1 for locked, 2 for contended.
This does mean that there is a slight chance for unfairness due to the
fetch-and-store to zero in the wakeUp() function, but unfortunately this
cannot be avoid as the code is now.
Reviewed-by: joao
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use a Mach semaphore to implement QMutexPrivate::wait() and ::wakeup(). This
makes QMutex perform more or less identically the same as pthread_mutex_t when
contended.
Reviewed-by: joao
|
| |
| |
| |
| |
| |
| | |
This function is not used or implemented anywhere.
Reviewed-by: joao
|
|/
|
|
|
|
|
|
|
|
|
|
| |
QMutex locking could be used in performence critical code (such
as QObject and co.) where the cost of a function call is
not neglectible. This would slow down the common case where
there is only one thread and no contention.
Since we need to keep the old symbol for binary compatibilty, introduce
new *Inline function.
Reviewed-by: Brad
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|