summary refs log tree commit diff
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-08-06 13:41:21 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-08-09 16:26:38 -0300
commit393be2e3747ea3ef0d2e724115a5f42b2fa50dbd (patch)
tree6cdc2568e3a6a485f8bbf3d0f94f83873daad3a7 /tools/perf/util/map.c
parente5a1845fc0aeca85c98115980c3531129f87e18d (diff)
downloadlinux-393be2e3747ea3ef0d2e724115a5f42b2fa50dbd.tar.gz
perf symbols: Support minimal build without libelf
Now we have isolated all ELF-specific stuff, it's possible to build
without libelf. The output binary can do most of jobs but lacks (user
level) symbol information - kernel symbols are still accessable thanks
to the kallsyms.

To build perf without libelf (elfutils), give NO_LIBELF=1 to make.

For now, only 'perf probe' command is removed since it depends on
libelf/libdw heavily.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1344228082-15569-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 115654c469c6..287cb3452b4b 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -156,6 +156,7 @@ int map__load(struct map *self, symbol_filter_t filter)
 		pr_warning(", continuing without symbols\n");
 		return -1;
 	} else if (nr == 0) {
+#ifndef NO_LIBELF_SUPPORT
 		const size_t len = strlen(name);
 		const size_t real_len = len - sizeof(DSO__DELETED);
 
@@ -168,7 +169,7 @@ int map__load(struct map *self, symbol_filter_t filter)
 			pr_warning("no symbols found in %s, maybe install "
 				   "a debug package?\n", name);
 		}
-
+#endif
 		return -1;
 	}
 	/*