Message ID | 20230502092339.27341-13-mads@ynddal.dk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | simpletrace: refactor and general improvements | expand |
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))