aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-12-17 14:14:07 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-17 14:34:08 -0500
commit5f70619d67b99310be9aaf850293b7fd7f31d160 (patch)
tree08462ac8af933025178785dbf98167d8695768ec /tools/perf/util/symbol.c
parente57a2dffbc7e28cef5f4659b98a9d5595010ab4d (diff)
perf symbols: Use consistent name for the DSO binary type member
It was called "data_type", but in this context "data" is way too vague, it could mean the "data" ELF segment, or something else. Since we have dso__read_binary_type_filename() and the values this field receives are all DSO__BINARY_TYPE_<FOO> we may as well call it "binary_type" for consistency sake. It also seems more appropriate since it determines if we can do operations like annotation and DWARF unwinding, that needs more than just the symtab, requiring access to ELF text segments, CFI ELF sections, etc. Cc: 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: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-2lkbqrn23uc2uvnn9w9in379@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 9ee4b80dac57..923d00040bbf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1089,9 +1089,9 @@ static int dso__load_kcore(struct dso *dso, struct map *map,
1089 * dso__data_read_addr(). 1089 * dso__data_read_addr().
1090 */ 1090 */
1091 if (dso->kernel == DSO_TYPE_GUEST_KERNEL) 1091 if (dso->kernel == DSO_TYPE_GUEST_KERNEL)
1092 dso->data_type = DSO_BINARY_TYPE__GUEST_KCORE; 1092 dso->binary_type = DSO_BINARY_TYPE__GUEST_KCORE;
1093 else 1093 else
1094 dso->data_type = DSO_BINARY_TYPE__KCORE; 1094 dso->binary_type = DSO_BINARY_TYPE__KCORE;
1095 dso__set_long_name(dso, strdup(kcore_filename), true); 1095 dso__set_long_name(dso, strdup(kcore_filename), true);
1096 1096
1097 close(fd); 1097 close(fd);
@@ -1368,9 +1368,9 @@ int dso__load_vmlinux(struct dso *dso, struct map *map,
1368 1368
1369 if (err > 0) { 1369 if (err > 0) {
1370 if (dso->kernel == DSO_TYPE_GUEST_KERNEL) 1370 if (dso->kernel == DSO_TYPE_GUEST_KERNEL)
1371 dso->data_type = DSO_BINARY_TYPE__GUEST_VMLINUX; 1371 dso->binary_type = DSO_BINARY_TYPE__GUEST_VMLINUX;
1372 else 1372 else
1373 dso->data_type = DSO_BINARY_TYPE__VMLINUX; 1373 dso->binary_type = DSO_BINARY_TYPE__VMLINUX;
1374 dso__set_long_name(dso, vmlinux, vmlinux_allocated); 1374 dso__set_long_name(dso, vmlinux, vmlinux_allocated);
1375 dso__set_loaded(dso, map->type); 1375 dso__set_loaded(dso, map->type);
1376 pr_debug("Using %s for symbols\n", symfs_vmlinux); 1376 pr_debug("Using %s for symbols\n", symfs_vmlinux);