Skip to content

Commit 1a3f8c2

Browse files
xingfeng2510yonghong-song
authored andcommitted
tools/trace: Fix TypeError when format string contains %K or %U
1 parent 39f60c0 commit 1a3f8c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/trace.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ def print_event(self, bpf, cpu, data, size):
630630
event = ct.cast(data, ct.POINTER(self.python_struct)).contents
631631
if self.name not in event.comm:
632632
return
633-
values = map(lambda i: getattr(event, "v%d" % i),
634-
range(0, len(self.values)))
633+
values = list(map(lambda i: getattr(event, "v%d" % i),
634+
range(0, len(self.values))))
635635
msg = self._format_message(bpf, event.tgid, values)
636636
if self.msg_filter and self.msg_filter not in msg:
637637
return

0 commit comments

Comments
 (0)