diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-17 03:58:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-17 03:58:25 -0400 |
commit | bb3c3e807140816b5f5fd4840473ee52a916ad4f (patch) | |
tree | 9e8a69d266a7df86ca16177eefffab4b4e910753 /tools/perf/util/symbol.c | |
parent | 595c36490deb49381dc51231a3d5e6b66786ed27 (diff) | |
parent | 012abeea669ea49636cf952d13298bb68654146a (diff) |
Merge commit 'v2.6.32-rc5' into perf/probes
Conflicts:
kernel/trace/trace_event_profile.c
Merge reason: update to -rc5 and resolve conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index fd3d9c8e90fc..47ea0609a760 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -324,8 +324,7 @@ static inline int elf_sym__is_function(const GElf_Sym *sym) | |||
324 | { | 324 | { |
325 | return elf_sym__type(sym) == STT_FUNC && | 325 | return elf_sym__type(sym) == STT_FUNC && |
326 | sym->st_name != 0 && | 326 | sym->st_name != 0 && |
327 | sym->st_shndx != SHN_UNDEF && | 327 | sym->st_shndx != SHN_UNDEF; |
328 | sym->st_size != 0; | ||
329 | } | 328 | } |
330 | 329 | ||
331 | static inline int elf_sym__is_label(const GElf_Sym *sym) | 330 | static inline int elf_sym__is_label(const GElf_Sym *sym) |
@@ -833,7 +832,7 @@ int dso__load_modules(struct dso *self, symbol_filter_t filter, int v) | |||
833 | struct mod_dso *mods = mod_dso__new_dso("modules"); | 832 | struct mod_dso *mods = mod_dso__new_dso("modules"); |
834 | struct module *pos; | 833 | struct module *pos; |
835 | struct rb_node *next; | 834 | struct rb_node *next; |
836 | int err; | 835 | int err, count = 0; |
837 | 836 | ||
838 | err = mod_dso__load_modules(mods); | 837 | err = mod_dso__load_modules(mods); |
839 | 838 | ||
@@ -852,14 +851,16 @@ int dso__load_modules(struct dso *self, symbol_filter_t filter, int v) | |||
852 | break; | 851 | break; |
853 | 852 | ||
854 | next = rb_next(&pos->rb_node); | 853 | next = rb_next(&pos->rb_node); |
854 | count += err; | ||
855 | } | 855 | } |
856 | 856 | ||
857 | if (err < 0) { | 857 | if (err < 0) { |
858 | mod_dso__delete_modules(mods); | 858 | mod_dso__delete_modules(mods); |
859 | mod_dso__delete_self(mods); | 859 | mod_dso__delete_self(mods); |
860 | return err; | ||
860 | } | 861 | } |
861 | 862 | ||
862 | return err; | 863 | return count; |
863 | } | 864 | } |
864 | 865 | ||
865 | static inline void dso__fill_symbol_holes(struct dso *self) | 866 | static inline void dso__fill_symbol_holes(struct dso *self) |
@@ -913,8 +914,15 @@ int dso__load_kernel(struct dso *self, const char *vmlinux, | |||
913 | 914 | ||
914 | if (vmlinux) { | 915 | if (vmlinux) { |
915 | err = dso__load_vmlinux(self, vmlinux, filter, v); | 916 | err = dso__load_vmlinux(self, vmlinux, filter, v); |
916 | if (err > 0 && use_modules) | 917 | if (err > 0 && use_modules) { |
917 | err = dso__load_modules(self, filter, v); | 918 | int syms = dso__load_modules(self, filter, v); |
919 | |||
920 | if (syms < 0) { | ||
921 | fprintf(stderr, "dso__load_modules failed!\n"); | ||
922 | return syms; | ||
923 | } | ||
924 | err += syms; | ||
925 | } | ||
918 | } | 926 | } |
919 | 927 | ||
920 | if (err <= 0) | 928 | if (err <= 0) |