diff options
author | Mads Ynddal <m.ynddal@samsung.com> | 2023-09-26 12:34:36 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2023-09-26 12:28:51 -0400 |
commit | ff014701ab0f09fdbf37b4c39334790f9b298253 (patch) | |
tree | 4553857396e34b35a3ba0442e4f2544ba5098ab1 /scripts | |
parent | 84197267d1620405c664f6d4510288d0fd3a8837 (diff) | |
download | qemu-ff014701ab0f09fdbf37b4c39334790f9b298253.zip qemu-ff014701ab0f09fdbf37b4c39334790f9b298253.tar.gz qemu-ff014701ab0f09fdbf37b4c39334790f9b298253.tar.bz2 |
scripts/analyse-locks-simpletrace.py: changed iteritems() to items()
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script currently doesn't work on Python 3.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Mads Ynddal <m.ynddal@samsung.com>
Message-id: 20230926103436.25700-15-mads@ynddal.dk
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/analyse-locks-simpletrace.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py index 63c11f4..d650dd7 100755 --- a/scripts/analyse-locks-simpletrace.py +++ b/scripts/analyse-locks-simpletrace.py @@ -75,7 +75,7 @@ if __name__ == '__main__': (analyser.locks, analyser.locked, analyser.unlocks)) # Now dump the individual lock stats - for key, val in sorted(analyser.mutex_records.iteritems(), + for key, val in sorted(analyser.mutex_records.items(), key=lambda k_v: k_v[1]["locks"]): print ("Lock: %#x locks: %d, locked: %d, unlocked: %d" % (key, val["locks"], val["locked"], val["unlocked"])) |