diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-07-14 06:02:43 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-07-16 16:57:35 -0400 |
commit | bdac0bcf779250e89b96d4a3f381ebaf02c2f4a9 (patch) | |
tree | 11879777914728aeb42224779402a41621486f5c /tools | |
parent | c6d8f2a4a0c5e366330a6a2a94c06b652f4ca554 (diff) |
perf symbols: Do not attempt to read data from kallsyms
Record kallsyms binary type so that tools will not
attempt to read binary data from it.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1405332185-4050-20-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/symbol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index ae2e4464afa7..156ae36dfcfc 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -1664,6 +1664,7 @@ do_kallsyms: | |||
1664 | free(kallsyms_allocated_filename); | 1664 | free(kallsyms_allocated_filename); |
1665 | 1665 | ||
1666 | if (err > 0 && !dso__is_kcore(dso)) { | 1666 | if (err > 0 && !dso__is_kcore(dso)) { |
1667 | dso->binary_type = DSO_BINARY_TYPE__KALLSYMS; | ||
1667 | dso__set_long_name(dso, "[kernel.kallsyms]", false); | 1668 | dso__set_long_name(dso, "[kernel.kallsyms]", false); |
1668 | map__fixup_start(map); | 1669 | map__fixup_start(map); |
1669 | map__fixup_end(map); | 1670 | map__fixup_end(map); |
@@ -1711,6 +1712,7 @@ static int dso__load_guest_kernel_sym(struct dso *dso, struct map *map, | |||
1711 | if (err > 0) | 1712 | if (err > 0) |
1712 | pr_debug("Using %s for symbols\n", kallsyms_filename); | 1713 | pr_debug("Using %s for symbols\n", kallsyms_filename); |
1713 | if (err > 0 && !dso__is_kcore(dso)) { | 1714 | if (err > 0 && !dso__is_kcore(dso)) { |
1715 | dso->binary_type = DSO_BINARY_TYPE__GUEST_KALLSYMS; | ||
1714 | machine__mmap_name(machine, path, sizeof(path)); | 1716 | machine__mmap_name(machine, path, sizeof(path)); |
1715 | dso__set_long_name(dso, strdup(path), true); | 1717 | dso__set_long_name(dso, strdup(path), true); |
1716 | map__fixup_start(map); | 1718 | map__fixup_start(map); |