diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-08-06 00:41:21 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-09 15:26:38 -0400 |
commit | 393be2e3747ea3ef0d2e724115a5f42b2fa50dbd (patch) | |
tree | 6cdc2568e3a6a485f8bbf3d0f94f83873daad3a7 /tools/perf/util/symbol-minimal.c | |
parent | e5a1845fc0aeca85c98115980c3531129f87e18d (diff) |
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/symbol-minimal.c')
-rw-r--r-- | tools/perf/util/symbol-minimal.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c new file mode 100644 index 000000000000..416ecf3bccf5 --- /dev/null +++ b/tools/perf/util/symbol-minimal.c | |||
@@ -0,0 +1,39 @@ | |||
1 | #include "symbol.h" | ||
2 | |||
3 | |||
4 | int filename__read_build_id(const char *filename __used, void *bf __used, | ||
5 | size_t size __used) | ||
6 | { | ||
7 | return -1; | ||
8 | } | ||
9 | |||
10 | int sysfs__read_build_id(const char *filename __used, void *build_id __used, | ||
11 | size_t size __used) | ||
12 | { | ||
13 | return -1; | ||
14 | } | ||
15 | |||
16 | int filename__read_debuglink(const char *filename __used, | ||
17 | char *debuglink __used, size_t size __used) | ||
18 | { | ||
19 | return -1; | ||
20 | } | ||
21 | |||
22 | int dso__synthesize_plt_symbols(struct dso *dso __used, char *name __used, | ||
23 | struct map *map __used, | ||
24 | symbol_filter_t filter __used) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | int dso__load_sym(struct dso *dso __used, struct map *map __used, | ||
30 | const char *name __used, int fd __used, | ||
31 | symbol_filter_t filter __used, int kmodule __used, | ||
32 | int want_symtab __used) | ||
33 | { | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | void symbol__elf_init(void) | ||
38 | { | ||
39 | } | ||