Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402052

[PATCH 02/12] perf symbols: Store vdso buildid unconditionally

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 02/12] perf symbols: Store vdso buildid unconditionally
Date 2016-05-17 04:50 +0200
Message-ID <rzDf4-77f-25@gated-at.bofh.it> (permalink)
References <rzDf3-77f-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: He Kuang <hekuang@huawei.com>

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 | 2 +-
 tools/perf/util/dso.c      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index bff425e1232c..67e5966503b2 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -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)) {
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 3357479082ca..75b75615e2f8 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -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;
-- 
2.5.5

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/12] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 10/12] perf core: Add perf_callchain_store_context() helper Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 06/12] perf symbols: Introduce DSO__NAME_KALLSYMS and DSO__NAME_KCORE Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 01/12] perf stat: Avoid fractional digits for integer scales Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 09/12] perf core: Add a 'nr' field to perf_event_callchain_context Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 12/12] perf tools: Separate accounting of contexts and real addresses in a stack trace Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 03/12] perf stat: Fix indentation of stalled backend cycle Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 02/12] perf symbols: Store vdso buildid unconditionally Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  [PATCH 05/12] perf stat: Use cpu-clock event for cpu targets Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-17 04:50 +0200
  Re: [GIT PULL 00/12] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-05-20 08:30 +0200

csiph-web