[Qemu-devel] [RFC PATCH 00/26] replay additions

Pavel Dovgalyuk posted 26 patches 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171031110641.5836.43266.stgit@pasha-VirtualBox
Test checkpatch failed
Test docker failed
Test ppc passed
Test s390x passed
There is a newer version of this series
accel/kvm/kvm-all.c                  |    4
accel/tcg/cpu-exec.c                 |    5 -
block/blkreplay.c                    |   73 ++++++++
cpus-common.c                        |   13 +
cpus.c                               |  149 +++++++++++++---
docs/replay.txt                      |   88 ++++++++++
include/qemu/thread.h                |   14 +-
include/qemu/timer.h                 |   14 ++
include/sysemu/replay.h              |   19 ++
migration/savevm.c                   |   13 +
replay/replay-char.c                 |   21 +-
replay/replay-events.c               |   30 +--
replay/replay-internal.c             |   26 +++
replay/replay-internal.h             |    9 +
replay/replay-snapshot.c             |    9 +
replay/replay-time.c                 |   10 +
replay/replay.c                      |   43 ++---
scripts/analyse-locks-simpletrace.py |   99 +++++++++++
scripts/qemu-gdb.py                  |    4
scripts/qemugdb/tcg.py               |   46 +++++
scripts/qemugdb/timers.py            |   54 ++++++
scripts/replay-dump.py               |  308 ++++++++++++++++++++++++++++++++++
stubs/replay.c                       |   16 ++
target/arm/arm-powerctl.c            |    8 -
target/i386/hax-all.c                |    3
util/main-loop.c                     |   23 ++-
util/qemu-thread-posix.c             |   21 +-
util/qemu-timer.c                    |   12 +
util/trace-events                    |    7 -
vl.c                                 |   12 +
30 files changed, 1014 insertions(+), 139 deletions(-)
create mode 100755 scripts/analyse-locks-simpletrace.py
create mode 100644 scripts/qemugdb/tcg.py
create mode 100644 scripts/qemugdb/timers.py
create mode 100755 scripts/replay-dump.py
[Qemu-devel] [RFC PATCH 00/26] replay additions
Posted by Pavel Dovgalyuk 6 years, 5 months ago
This set of patches includex fixes from Alex Bennée for fixing
BQL and replay locks after inventing the MTTCG. It also includes some
additional replay patches that makes this set of fixes working.
It is also fixes some vmstate creation (and loading) issues
in record/replay modes:
 - VM start/stop fixes in replay mode
 - overlay creation for blkreplay filter
 - fixes for vmstate save/load in record/replay mode
 - fixes for host clock vmstate
 - fixes for icount timers vmstate

There is also a set of helper scripts written by Alex Bennée
for debugging the record/replay code.

---

Alex Bennée (12):
      target/arm/arm-powertctl: drop BQL assertions
      cpus: push BQL lock to qemu_*_wait_io_event
      cpus: only take BQL for sleeping threads
      replay/replay.c: bump REPLAY_VERSION again
      replay/replay-internal.c: track holding of replay_lock
      replay: make locking visible outside replay code
      replay: push replay_mutex_lock up the call tree
      scripts/qemu-gdb: add simple tcg lock status helper
      util/qemu-thread-*: add qemu_lock, locked and unlock trace events
      scripts/analyse-locks-simpletrace.py: script to analyse lock times
      scripts/replay-dump.py: replay log dumper
      scripts/qemu-gdb/timers.py: new helper to dump timer state

Pavel Dovgalyuk (14):
      block: implement bdrv_snapshot_goto for blkreplay
      blkreplay: create temporary overlay for underlaying devices
      replay: disable default snapshot for record/replay
      replay: fix processing async events
      replay: fixed replay_enable_events
      replay: fix save/load vm for non-empty queue
      replay: added replay log format description
      replay: make safe vmstop at record/replay
      replay: save prior value of the host clock
      icount: fixed saving/restoring of icount warp timers
      cpu-exec: don't overwrite exception_index
      cpu-exec: reset exit flag before calling cpu_exec_nocache
      replay: don't destroy mutex at exit
      replay: check return values of fwrite


 accel/kvm/kvm-all.c                  |    4 
 accel/tcg/cpu-exec.c                 |    5 -
 block/blkreplay.c                    |   73 ++++++++
 cpus-common.c                        |   13 +
 cpus.c                               |  149 +++++++++++++---
 docs/replay.txt                      |   88 ++++++++++
 include/qemu/thread.h                |   14 +-
 include/qemu/timer.h                 |   14 ++
 include/sysemu/replay.h              |   19 ++
 migration/savevm.c                   |   13 +
 replay/replay-char.c                 |   21 +-
 replay/replay-events.c               |   30 +--
 replay/replay-internal.c             |   26 +++
 replay/replay-internal.h             |    9 +
 replay/replay-snapshot.c             |    9 +
 replay/replay-time.c                 |   10 +
 replay/replay.c                      |   43 ++---
 scripts/analyse-locks-simpletrace.py |   99 +++++++++++
 scripts/qemu-gdb.py                  |    4 
 scripts/qemugdb/tcg.py               |   46 +++++
 scripts/qemugdb/timers.py            |   54 ++++++
 scripts/replay-dump.py               |  308 ++++++++++++++++++++++++++++++++++
 stubs/replay.c                       |   16 ++
 target/arm/arm-powerctl.c            |    8 -
 target/i386/hax-all.c                |    3 
 util/main-loop.c                     |   23 ++-
 util/qemu-thread-posix.c             |   21 +-
 util/qemu-timer.c                    |   12 +
 util/trace-events                    |    7 -
 vl.c                                 |   12 +
 30 files changed, 1014 insertions(+), 139 deletions(-)
 create mode 100755 scripts/analyse-locks-simpletrace.py
 create mode 100644 scripts/qemugdb/tcg.py
 create mode 100644 scripts/qemugdb/timers.py
 create mode 100755 scripts/replay-dump.py

-- 
Pavel Dovgalyuk

Re: [Qemu-devel] [RFC PATCH 00/26] replay additions
Posted by no-reply@patchew.org 6 years, 5 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH 00/26] replay additions
Type: series
Message-id: 20171031110641.5836.43266.stgit@pasha-VirtualBox

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
8f55c902ad scripts/qemu-gdb/timers.py: new helper to dump timer state
a8cba1b214 scripts/replay-dump.py: replay log dumper
15dcdd58a9 scripts/analyse-locks-simpletrace.py: script to analyse lock times
2b717ce080 util/qemu-thread-*: add qemu_lock, locked and unlock trace events
dce04fcfd9 scripts/qemu-gdb: add simple tcg lock status helper
a197d956c9 replay: check return values of fwrite
6a31eda883 replay: don't destroy mutex at exit
22d8103583 cpu-exec: reset exit flag before calling cpu_exec_nocache
ffd5f8380a cpu-exec: don't overwrite exception_index
383b2a323d replay: push replay_mutex_lock up the call tree
915bfa3562 replay: make locking visible outside replay code
2a47ac1a9b replay/replay-internal.c: track holding of replay_lock
bb876be027 replay/replay.c: bump REPLAY_VERSION again
617e2488f1 cpus: only take BQL for sleeping threads
714ff08a06 cpus: push BQL lock to qemu_*_wait_io_event
f96528d08a target/arm/arm-powertctl: drop BQL assertions
9fece25a19 icount: fixed saving/restoring of icount warp timers
f71c5b84e7 replay: save prior value of the host clock
695405b4c6 replay: make safe vmstop at record/replay
64e3b6ab3d replay: added replay log format description
fc18acd5c0 replay: fix save/load vm for non-empty queue
0f4d59a726 replay: fixed replay_enable_events
7b8e9c1e53 replay: fix processing async events
bba29a49ed replay: disable default snapshot for record/replay
85e4f184ac blkreplay: create temporary overlay for underlaying devices
42b8f38eb3 block: implement bdrv_snapshot_goto for blkreplay

=== OUTPUT BEGIN ===
Checking PATCH 1/26: block: implement bdrv_snapshot_goto for blkreplay...
Checking PATCH 2/26: blkreplay: create temporary overlay for underlaying devices...
Checking PATCH 3/26: replay: disable default snapshot for record/replay...
Checking PATCH 4/26: replay: fix processing async events...
Checking PATCH 5/26: replay: fixed replay_enable_events...
Checking PATCH 6/26: replay: fix save/load vm for non-empty queue...
ERROR: Error messages should not contain newlines
#60: FILE: migration/savevm.c:2322:
+                     "right now. Try once more later.\n");

total: 1 errors, 0 warnings, 48 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 7/26: replay: added replay log format description...
Checking PATCH 8/26: replay: make safe vmstop at record/replay...
ERROR: Error messages should not contain newlines
#45: FILE: migration/savevm.c:2147:
+                     "right now. Try once more later.\n");

total: 1 errors, 0 warnings, 23 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 9/26: replay: save prior value of the host clock...
Checking PATCH 10/26: icount: fixed saving/restoring of icount warp timers...
ERROR: spaces required around that '*' (ctx:VxV)
#171: FILE: cpus.c:688:
+    .subsections = (const VMStateDescription*[]) {
                                             ^

total: 1 errors, 0 warnings, 174 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 11/26: target/arm/arm-powertctl: drop BQL assertions...
Checking PATCH 12/26: cpus: push BQL lock to qemu_*_wait_io_event...
Checking PATCH 13/26: cpus: only take BQL for sleeping threads...
Checking PATCH 14/26: replay/replay.c: bump REPLAY_VERSION again...
Checking PATCH 15/26: replay/replay-internal.c: track holding of replay_lock...
Checking PATCH 16/26: replay: make locking visible outside replay code...
Checking PATCH 17/26: replay: push replay_mutex_lock up the call tree...
Checking PATCH 18/26: cpu-exec: don't overwrite exception_index...
Checking PATCH 19/26: cpu-exec: reset exit flag before calling cpu_exec_nocache...
Checking PATCH 20/26: replay: don't destroy mutex at exit...
Checking PATCH 21/26: replay: check return values of fwrite...
Checking PATCH 22/26: scripts/qemu-gdb: add simple tcg lock status helper...
Checking PATCH 23/26: util/qemu-thread-*: add qemu_lock, locked and unlock trace events...
WARNING: line over 80 characters
#30: FILE: include/qemu/thread.h:30:
+#define qemu_mutex_trylock(mutex) qemu_mutex_trylock_impl(mutex, __FILE__, __LINE__)

WARNING: line over 80 characters
#31: FILE: include/qemu/thread.h:31:
+#define qemu_mutex_unlock(mutex) qemu_mutex_unlock_impl(mutex, __FILE__, __LINE__)

ERROR: line over 90 characters
#40: FILE: include/qemu/thread.h:46:
+void qemu_cond_wait_impl(QemuCond *cond, QemuMutex *mutex, const char *file, const int line);

WARNING: line over 80 characters
#42: FILE: include/qemu/thread.h:48:
+#define qemu_cond_wait(cond, mutex) qemu_cond_wait_impl(cond, mutex, __FILE__, __LINE__)

ERROR: line over 90 characters
#107: FILE: util/qemu-thread-posix.c:158:
+void qemu_cond_wait_impl(QemuCond *cond, QemuMutex *mutex, const char *file, const int line)

total: 2 errors, 3 warnings, 103 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 24/26: scripts/analyse-locks-simpletrace.py: script to analyse lock times...
Checking PATCH 25/26: scripts/replay-dump.py: replay log dumper...
Checking PATCH 26/26: scripts/qemu-gdb/timers.py: new helper to dump timer state...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org