[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/12] scripts/analyse-locks-simpletrace.py: reflect changes t
|
From: |
Mads Ynddal |
|
Subject: |
[PATCH v2 12/12] scripts/analyse-locks-simpletrace.py: reflect changes to process in simpletrace.py |
|
Date: |
Tue, 2 May 2023 11:23:39 +0200 |
From: Mads Ynddal <m.ynddal@samsung.com>
The signature of `process` in simpletrace.py has changed to not take
filepaths as the two first arguments, but rather a file-like object. We
change the code here to reflect that.
Signed-off-by: Mads Ynddal <m.ynddal@samsung.com>
---
scripts/analyse-locks-simpletrace.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/analyse-locks-simpletrace.py
b/scripts/analyse-locks-simpletrace.py
index d650dd7140..235fae2ba2 100755
--- a/scripts/analyse-locks-simpletrace.py
+++ b/scripts/analyse-locks-simpletrace.py
@@ -69,7 +69,8 @@ def get_args():
# Gather data from the trace
analyser = MutexAnalyser()
- simpletrace.process(args.events, args.tracefile, analyser)
+ with open(args.events, 'r') as events, open(args.tracefile, 'rb') as
tracefile:
+ simpletrace.process(events, tracefile, analyser)
print ("Total locks: %d, locked: %d, unlocked: %d" %
(analyser.locks, analyser.locked, analyser.unlocks))
--
2.38.1
- Re: [PATCH v2 05/12] simpletrace: Changed Analyzer class to become context-manager, (continued)
- [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, 2023/05/02
- [PATCH v2 12/12] scripts/analyse-locks-simpletrace.py: reflect changes to process in simpletrace.py,
Mads Ynddal <=
- 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