Skip to content

Commit

Permalink
uthreads: Migrate to new symbols API and include module name
Browse files Browse the repository at this point in the history
  • Loading branch information
goldshtn committed Feb 21, 2017
1 parent 2bf3ff3 commit b1bff01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/uthreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def print_event(cpu, data, size):
event = ct.cast(data, ct.POINTER(ThreadEvent)).contents
name = event.name
if event.type == "pthread":
name = bpf.sym(event.runtime_id, args.pid)
name = bpf.sym(event.runtime_id, args.pid, show_module=True)
tid = event.native_id
else:
tid = "R=%s/N=%s" % (event.runtime_id, event.native_id)
Expand Down
8 changes: 4 additions & 4 deletions tools/uthreads_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Next, trace only pthread creation events in some native application:
# ./uthreads 27450
Tracing thread events in process 27450 (language: none)... Ctrl-C to quit.
TIME ID TYPE DESCRIPTION
0.924 27462 pthread primes_thread
0.927 27463 pthread primes_thread
0.928 27464 pthread primes_thread
0.928 27465 pthread primes_thread
0.924 27462 pthread primes_thread [primes]
0.927 27463 pthread primes_thread [primes]
0.928 27464 pthread primes_thread [primes]
0.928 27465 pthread primes_thread [primes]
^C

The thread name ("primes_thread" in this example) is resolved from debuginfo.
Expand Down

0 comments on commit b1bff01

Please sign in to comment.