[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/12] scripts/analyse-locks-simpletrace.py: changed iteritems
|
From: |
Mads Ynddal |
|
Subject: |
[PATCH v2 11/12] scripts/analyse-locks-simpletrace.py: changed iteritems() to items() |
|
Date: |
Tue, 2 May 2023 11:23:38 +0200 |
From: Mads Ynddal <m.ynddal@samsung.com>
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script curerntly doesn't work on Python 3.
Signed-off-by: Mads Ynddal <m.ynddal@samsung.com>
---
scripts/analyse-locks-simpletrace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/analyse-locks-simpletrace.py
b/scripts/analyse-locks-simpletrace.py
index 63c11f4fce..d650dd7140 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -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"]))
--
2.38.1
- [PATCH v2 05/12] simpletrace: Changed Analyzer class to become context-manager, (continued)
- [PATCH v2 05/12] simpletrace: Changed Analyzer class to become context-manager, Mads Ynddal, 2023/05/02
- [PATCH v2 06/12] simpletrace: Simplify construction of tracing methods, Mads Ynddal, 2023/05/02
- [PATCH v2 07/12] simpletrace: Improved error handling on struct unpack, Mads Ynddal, 2023/05/02
- [PATCH v2 08/12] simpletrace: define exception and add handling, Mads Ynddal, 2023/05/02
- [PATCH v2 09/12] simpletrace: Refactor to separate responsibilities, Mads Ynddal, 2023/05/02
- [PATCH v2 10/12] MAINTAINERS: add maintainer of simpletrace.py, Mads Ynddal, 2023/05/02
- [PATCH v2 11/12] scripts/analyse-locks-simpletrace.py: changed iteritems() to items(),
Mads Ynddal <=
- [PATCH v2 12/12] scripts/analyse-locks-simpletrace.py: reflect changes to process in simpletrace.py, Mads Ynddal, 2023/05/02
- Re: [PATCH v2 00/12] simpletrace: refactor and general improvements, John Snow, 2023/05/03
- Re: [PATCH v2 00/12] simpletrace: refactor and general improvements, Stefan Hajnoczi, 2023/05/04