[py3:tools/deadlock.py] fix usage of str.replace() method to make it py3 compartible
authorOleg Guba <oleg@dropbox.com>
Wed, 14 Jul 2021 04:25:09 +0000 (21:25 -0700)
committeryonghong-song <ys114321@gmail.com>
Wed, 14 Jul 2021 06:23:20 +0000 (23:23 -0700)
tools/deadlock.py

index d6046c24178c27e21dbbb431081e1339bc60ec92..bc66677fcc0efd5580f82e61ad543f63ca6e899d 100755 (executable)
@@ -477,8 +477,8 @@ def main():
 
     with open('deadlock.c') as f:
         text = f.read()
-    text = text.replace(b'MAX_THREADS', str(args.threads));
-    text = text.replace(b'MAX_EDGES', str(args.edges));
+    text = text.replace('MAX_THREADS', str(args.threads));
+    text = text.replace('MAX_EDGES', str(args.edges));
     bpf = BPF(text=text)
 
     # Trace where threads are created