diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2018-06-13 14:23:08 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-06-28 19:05:32 +0200 |
| commit | ba59fb778ec68b072196cff9af11c7612a6e52f2 (patch) | |
| tree | ed0008190d1ecec2102d9f506a879f2e119a930b /include/qemu/thread-win32.h | |
| parent | f1aff7aa8e6f238909bd0b0e7a1fe235802843f2 (diff) | |
| download | focaccia-qemu-ba59fb778ec68b072196cff9af11c7612a6e52f2.tar.gz focaccia-qemu-ba59fb778ec68b072196cff9af11c7612a6e52f2.zip | |
QemuMutex: support --enable-debug-mutex
We have had some tracing tools for mutex but it's not easy to use them for e.g. dead locks. Let's provide "--enable-debug-mutex" parameter when configure to allow QemuMutex to store the last owner that took specific lock. It will be easy to use this tool to debug deadlocks since we can directly know who took the lock then as long as we can have a debugger attached to the process. Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180425025459.5258-4-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/thread-win32.h')
| -rw-r--r-- | include/qemu/thread-win32.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/qemu/thread-win32.h b/include/qemu/thread-win32.h index 3a05e3b3aa..d668d789b4 100644 --- a/include/qemu/thread-win32.h +++ b/include/qemu/thread-win32.h @@ -5,6 +5,10 @@ struct QemuMutex { SRWLOCK lock; +#ifdef CONFIG_DEBUG_MUTEX + const char *file; + int line; +#endif bool initialized; }; |