Skip to content

Commit

Permalink
scripts/analyse-locks-simpletrace.py: changed iteritems() to items()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baekalfen authored and stefanhaRH committed Sep 26, 2023
1 parent 8419726 commit ff01470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/analyse-locks-simpletrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_args():
(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"]))
Expand Down

0 comments on commit ff01470

Please sign in to comment.