Skip to content

Commit

Permalink
tools/threadsnoop: Fix unknown thread start address
Browse files Browse the repository at this point in the history
  • Loading branch information
xingfeng2510 authored and yonghong-song committed Jul 28, 2024
1 parent 2a7eec8 commit 521b596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/threadsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def print_event(cpu, data, size):
event = b["events"].event(data)
if start_ts == 0:
start_ts = event.ts
func = b.sym(event.start, event.pid)
func = b.sym(event.start, event.pid).decode('utf-8', 'replace')
if (func == "[unknown]"):
func = hex(event.start)
print("%-10d %-7d %-16s %s" % ((event.ts - start_ts) / 1000000,
event.pid, event.comm, func))
event.pid, event.comm.decode('utf-8', 'replace'), func))

b["events"].open_perf_buffer(print_event)
while 1:
Expand Down

0 comments on commit 521b596

Please sign in to comment.