diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-03-11 05:45:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-03-11 05:45:32 -0400 |
commit | b8ad0f912b93c23c34dfedc615a0eeba6ca29463 (patch) | |
tree | 405dccc0c9eedcb09ec9eda02102216648ed7d63 /tools | |
parent | 8712a00514e50aafa7c9bf5cd3955fa60758e53b (diff) | |
parent | fdf57dd052d5cbd415533ae98f4d423286a85220 (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
* Fix build of 'trace' in some systems due to using some architecture-specific
signal numbers (Ben Hutchings)
* Stop resolving when finding a map in in ip__resolve_ams, this way at least
the DSO will be resolved when a symbol isn't (Don Zickus)
* Fix crash in elf_section_by_name when not checking if some section string index
is valid (Jiri Olsa)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-trace.c | 10 | ||||
-rw-r--r-- | tools/perf/util/machine.c | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol-elf.c | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 6aa6fb6f7bd9..f954c26de231 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -825,7 +825,6 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal | |||
825 | P_SIGNUM(PIPE); | 825 | P_SIGNUM(PIPE); |
826 | P_SIGNUM(ALRM); | 826 | P_SIGNUM(ALRM); |
827 | P_SIGNUM(TERM); | 827 | P_SIGNUM(TERM); |
828 | P_SIGNUM(STKFLT); | ||
829 | P_SIGNUM(CHLD); | 828 | P_SIGNUM(CHLD); |
830 | P_SIGNUM(CONT); | 829 | P_SIGNUM(CONT); |
831 | P_SIGNUM(STOP); | 830 | P_SIGNUM(STOP); |
@@ -841,6 +840,15 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal | |||
841 | P_SIGNUM(IO); | 840 | P_SIGNUM(IO); |
842 | P_SIGNUM(PWR); | 841 | P_SIGNUM(PWR); |
843 | P_SIGNUM(SYS); | 842 | P_SIGNUM(SYS); |
843 | #ifdef SIGEMT | ||
844 | P_SIGNUM(EMT); | ||
845 | #endif | ||
846 | #ifdef SIGSTKFLT | ||
847 | P_SIGNUM(STKFLT); | ||
848 | #endif | ||
849 | #ifdef SIGSWI | ||
850 | P_SIGNUM(SWI); | ||
851 | #endif | ||
844 | default: break; | 852 | default: break; |
845 | } | 853 | } |
846 | 854 | ||
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index c872991e0f65..620a1983b76b 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c | |||
@@ -1213,7 +1213,7 @@ static void ip__resolve_ams(struct machine *machine, struct thread *thread, | |||
1213 | */ | 1213 | */ |
1214 | thread__find_addr_location(thread, machine, m, MAP__FUNCTION, | 1214 | thread__find_addr_location(thread, machine, m, MAP__FUNCTION, |
1215 | ip, &al); | 1215 | ip, &al); |
1216 | if (al.sym) | 1216 | if (al.map) |
1217 | goto found; | 1217 | goto found; |
1218 | } | 1218 | } |
1219 | found: | 1219 | found: |
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 3e9f336740fa..516d19fb999b 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
@@ -151,15 +151,15 @@ Elf_Scn *elf_section_by_name(Elf *elf, GElf_Ehdr *ep, | |||
151 | 151 | ||
152 | gelf_getshdr(sec, shp); | 152 | gelf_getshdr(sec, shp); |
153 | str = elf_strptr(elf, ep->e_shstrndx, shp->sh_name); | 153 | str = elf_strptr(elf, ep->e_shstrndx, shp->sh_name); |
154 | if (!strcmp(name, str)) { | 154 | if (str && !strcmp(name, str)) { |
155 | if (idx) | 155 | if (idx) |
156 | *idx = cnt; | 156 | *idx = cnt; |
157 | break; | 157 | return sec; |
158 | } | 158 | } |
159 | ++cnt; | 159 | ++cnt; |
160 | } | 160 | } |
161 | 161 | ||
162 | return sec; | 162 | return NULL; |
163 | } | 163 | } |
164 | 164 | ||
165 | #define elf_section__for_each_rel(reldata, pos, pos_mem, idx, nr_entries) \ | 165 | #define elf_section__for_each_rel(reldata, pos, pos_mem, idx, nr_entries) \ |