summaryrefslogtreecommitdiff
path: root/tools/perf/util/thread.c
diff options
context:
space:
mode:
authorKrister Johansen <kjlx@templeofstupid.com>2017-07-06 04:48:08 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-19 05:14:09 +0300
commit843ff37bb59edbe51d64e77ba1b3245a15a4dd9f (patch)
tree7c1e50cb4b60af9776364ec65118c9a0db0cbcdf /tools/perf/util/thread.c
parent86bcdb5a43997bb02ba25a76482c7bfc652ba45b (diff)
downloadlinux-843ff37bb59edbe51d64e77ba1b3245a15a4dd9f.tar.xz
perf symbols: Find symbols in different mount namespace
Teach perf how to resolve symbols from binaries that are in a different mount namespace from the tool. This allows perf to generate meaningful stack traces even if the binary resides in a different mount namespace from the tool. Signed-off-by: Krister Johansen <kjlx@templeofstupid.com> Tested-by: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/1499305693-1599-2-git-send-email-kjlx@templeofstupid.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.c')
-rw-r--r--tools/perf/util/thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 378c418ca0c1..aee9a42102ba 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -59,6 +59,8 @@ struct thread *thread__new(pid_t pid, pid_t tid)
list_add(&comm->list, &thread->comm_list);
refcount_set(&thread->refcnt, 1);
RB_CLEAR_NODE(&thread->rb_node);
+ /* Thread holds first ref to nsdata. */
+ thread->nsinfo = nsinfo__new(pid);
}
return thread;
@@ -91,6 +93,7 @@ void thread__delete(struct thread *thread)
comm__free(comm);
}
unwind__finish_access(thread);
+ nsinfo__zput(thread->nsinfo);
free(thread);
}