diff options
Diffstat (limited to 'tools/perf/util')
-rwxr-xr-x | tools/perf/util/generate-cmdlist.sh | 15 | ||||
-rw-r--r-- | tools/perf/util/map.c | 3 | ||||
-rw-r--r-- | tools/perf/util/symbol-minimal.c | 39 |
3 files changed, 56 insertions, 1 deletions
diff --git a/tools/perf/util/generate-cmdlist.sh b/tools/perf/util/generate-cmdlist.sh index f06f6fd148f..389590c1ad2 100755 --- a/tools/perf/util/generate-cmdlist.sh +++ b/tools/perf/util/generate-cmdlist.sh @@ -21,4 +21,19 @@ do p }' "Documentation/perf-$cmd.txt" done + +echo "#ifndef NO_LIBELF_SUPPORT" +sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt | +sort | +while read cmd +do + sed -n ' + /^NAME/,/perf-'"$cmd"'/H + ${ + x + s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ + p + }' "Documentation/perf-$cmd.txt" +done +echo "#endif /* NO_LIBELF_SUPPORT */" echo "};" diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 115654c469c..287cb3452b4 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; } /* diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c new file mode 100644 index 00000000000..416ecf3bccf --- /dev/null +++ b/tools/perf/util/symbol-minimal.c @@ -0,0 +1,39 @@ +#include "symbol.h" + + +int filename__read_build_id(const char *filename __used, void *bf __used, + size_t size __used) +{ + return -1; +} + +int sysfs__read_build_id(const char *filename __used, void *build_id __used, + size_t size __used) +{ + return -1; +} + +int filename__read_debuglink(const char *filename __used, + char *debuglink __used, size_t size __used) +{ + return -1; +} + +int dso__synthesize_plt_symbols(struct dso *dso __used, char *name __used, + struct map *map __used, + symbol_filter_t filter __used) +{ + return 0; +} + +int dso__load_sym(struct dso *dso __used, struct map *map __used, + const char *name __used, int fd __used, + symbol_filter_t filter __used, int kmodule __used, + int want_symtab __used) +{ + return 0; +} + +void symbol__elf_init(void) +{ +} |