[Qemu-devel] [PATCH v4 0/4] qemu-thread: support --enable-debug-mutex

Peter Xu posted 4 patches 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180423053927.13715-1-peterx@redhat.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test s390x passed
There is a newer version of this series
configure                   | 11 +++++++++++
include/qemu/thread-posix.h |  4 ++++
include/qemu/thread-win32.h |  4 ++++
util/qemu-thread-common.h   | 46 +++++++++++++++++++++++++++++++++++++++++++++
tests/atomic_add-bench.c    | 19 +++++++++++++++++--
util/qemu-thread-posix.c    | 17 +++++++----------
util/qemu-thread-win32.c    | 15 +++++++--------
7 files changed, 96 insertions(+), 20 deletions(-)
create mode 100644 util/qemu-thread-common.h
[Qemu-devel] [PATCH v4 0/4] qemu-thread: support --enable-debug-mutex
Posted by Peter Xu 5 years, 11 months ago
v4:
- cherrypick Emilio's patch to add "-m" parameter to atomic_add-bench
  tool.
- use inline functions [Emilio]

Micro benchmark result on "taskset -c 0 atomic_add-bench -m":

|--------+---------------------+------------------------|
|        | with --enable-debug | without --enable-debug |
|--------+---------------------+------------------------|
| Before | 20 Mops/s           | 34 Mops/s              |
| After  | 18 Mops/s           | 34 Mops/s              |
|--------+---------------------+------------------------|

v3:
- note down owner for every locking operations [Emilio]
- let Windows use it too [Emilio]
- added two more patches: patch 1 & 3.

Patch 1 generalize some common hooks for qemu-thread implementation
for both POSIX and Windows.

Patch 2 introduces the new debugging facility.

Patch 3 turns on mutex debugging automatically for "--enable-debug". I
suppose most developers are with that so we naturally benefit from it.

Please review.  Thanks.

Emilio G. Cota (1):
  tests/atomic_add-bench: add -m option to use mutexes

Peter Xu (3):
  qemu-thread: introduce qemu-thread-common.h
  QemuMutex: support --enable-debug-mutex
  configure: enable debug-mutex if debug enabled

 configure                   | 11 +++++++++++
 include/qemu/thread-posix.h |  4 ++++
 include/qemu/thread-win32.h |  4 ++++
 util/qemu-thread-common.h   | 46 +++++++++++++++++++++++++++++++++++++++++++++
 tests/atomic_add-bench.c    | 19 +++++++++++++++++--
 util/qemu-thread-posix.c    | 17 +++++++----------
 util/qemu-thread-win32.c    | 15 +++++++--------
 7 files changed, 96 insertions(+), 20 deletions(-)
 create mode 100644 util/qemu-thread-common.h

-- 
2.14.3