Skip to content

Commit

Permalink
tools/trace: Fix TypeError when format string contains %K or %U
Browse files Browse the repository at this point in the history
  • Loading branch information
xingfeng2510 authored and yonghong-song committed Aug 14, 2022
1 parent 39f60c0 commit 1a3f8c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ def print_event(self, bpf, cpu, data, size):
event = ct.cast(data, ct.POINTER(self.python_struct)).contents
if self.name not in event.comm:
return
values = map(lambda i: getattr(event, "v%d" % i),
range(0, len(self.values)))
values = list(map(lambda i: getattr(event, "v%d" % i),
range(0, len(self.values))))
msg = self._format_message(bpf, event.tgid, values)
if self.msg_filter and self.msg_filter not in msg:
return
Expand Down

0 comments on commit 1a3f8c2

Please sign in to comment.