aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-16 13:41:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-16 13:41:21 -0400
commitb44eeb4d47b2a7e3e3494fff126b66338b360ce3 (patch)
tree1680a39b12f848cdf277b00c2eb00932e446b45d
parent4f87dac386cc43d5525da7a939d4b4e7edbea22c (diff)
parentb7b4839d93e50adccef29eccb694807cdcb8bee3 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Misc smaller fixes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix leak in uncore_type_init failure paths perf machine: Use map as success in ip__resolve_ams perf symbols: Fix crash in elf_section_by_name perf trace: Decode architecture-specific signal numbers
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c3
-rw-r--r--tools/perf/builtin-trace.c10
-rw-r--r--tools/perf/util/machine.c2
-rw-r--r--tools/perf/util/symbol-elf.c6
4 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index c88f7f4b03ee..047f540cf3f7 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -3334,6 +3334,8 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
3334 if (!pmus) 3334 if (!pmus)
3335 return -ENOMEM; 3335 return -ENOMEM;
3336 3336
3337 type->pmus = pmus;
3338
3337 type->unconstrainted = (struct event_constraint) 3339 type->unconstrainted = (struct event_constraint)
3338 __EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1, 3340 __EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1,
3339 0, type->num_counters, 0, 0); 3341 0, type->num_counters, 0, 0);
@@ -3369,7 +3371,6 @@ static int __init uncore_type_init(struct intel_uncore_type *type)
3369 } 3371 }
3370 3372
3371 type->pmu_group = &uncore_pmu_attr_group; 3373 type->pmu_group = &uncore_pmu_attr_group;
3372 type->pmus = pmus;
3373 return 0; 3374 return 0;
3374fail: 3375fail:
3375 uncore_type_exit(type); 3376 uncore_type_exit(type);
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 }
1219found: 1219found:
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) \