From b1bff01dfb84c777ea5ca6ee55ce593303e4a411 Mon Sep 17 00:00:00 2001 From: Sasha Goldshtein Date: Wed, 8 Feb 2017 23:25:28 -0500 Subject: [PATCH] uthreads: Migrate to new symbols API and include module name --- tools/uthreads.py | 2 +- tools/uthreads_example.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/uthreads.py b/tools/uthreads.py index eb06f2b..7f731a2 100755 --- a/tools/uthreads.py +++ b/tools/uthreads.py @@ -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) diff --git a/tools/uthreads_example.txt b/tools/uthreads_example.txt index 664b341..a44e7fe 100644 --- a/tools/uthreads_example.txt +++ b/tools/uthreads_example.txt @@ -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. -- 2.7.4