]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf symbols: Store vdso buildid unconditionally
authorHe Kuang <hekuang@huawei.com>
Thu, 12 May 2016 08:43:11 +0000 (08:43 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 17 May 2016 02:11:45 +0000 (23:11 -0300)
When unwinding callchains on a different machine, vdso info should be
available so the unwind process won't be interrupted if address falls
into vdso region. But in most cases, the addresses of sample events are
not in vdso range, the buildid of a zero hit vdso won't be stored into
perf.data.

This patch stores vdso buildid regardless of whether the vdso is hit or
not.

Signed-off-by: He Kuang <hekuang@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1463042596-61703-3-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/build-id.c
tools/perf/util/dso.c

index bff425e1232cdcb99f362e1b7d5971e5d1121a23..67e5966503b21099688d3f90cf903b2d58d196df 100644 (file)
@@ -256,7 +256,7 @@ static int machine__write_buildid_table(struct machine *machine, int fd)
                size_t name_len;
                bool in_kernel = false;
 
-               if (!pos->hit)
+               if (!pos->hit && !dso__is_vdso(pos))
                        continue;
 
                if (dso__is_vdso(pos)) {
index 3357479082ca95b9b6cfd4df5015a30b470214fe..75b75615e2f881be286b043cdbcd256862db9d4b 100644 (file)
@@ -7,6 +7,7 @@
 #include "auxtrace.h"
 #include "util.h"
 #include "debug.h"
+#include "vdso.h"
 
 char dso__symtab_origin(const struct dso *dso)
 {
@@ -1169,7 +1170,7 @@ bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
        struct dso *pos;
 
        list_for_each_entry(pos, head, node) {
-               if (with_hits && !pos->hit)
+               if (with_hits && !pos->hit && !dso__is_vdso(pos))
                        continue;
                if (pos->has_build_id) {
                        have_build_id = true;