diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-01-17 05:04:35 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-01-17 05:04:35 -0500 |
| commit | d01de2389c0190f5959f0a1258a2e87d2fe4ca82 (patch) | |
| tree | 7c4708991245cf4abf4161b5ffa9741c0ff2bb9c | |
| parent | 33636732dcd7cc738a5913bb730d663c6b03c8fb (diff) | |
| parent | 6bcf9c1ff3ec22fd81eba336737d9865476509b1 (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 segfault when using both the map symtab viewer and annotation
in the TUI (Namhyung Kim).
- uClibc build fixes (Alexey Brodkin, Vineet Gupta).
- bitops/hweight were moved from tools/perf/ too tools/include, move
some leftovers (Arnaldo Carvalho de Melo)
- Fix dwarf unwind x86_64 build error (Namhyung Kim)
- Fix __machine__findnew_thread() error path (Namhyung Kim)
- Propagate error code when write(2) failed in 'perf probe' (Namhyung Kim)
- Use dwfl_report_elf() instead of offline in powerpc bits to
properly handle non prelinked DSOs (Sukadev Bhattiprolu).
- Fix dwarf unwind using libunwind in 'perf test' (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
24 files changed, 131 insertions, 82 deletions
diff --git a/tools/include/asm-generic/bitops.h b/tools/include/asm-generic/bitops.h index 6eedba1f7732..653d1bad77de 100644 --- a/tools/include/asm-generic/bitops.h +++ b/tools/include/asm-generic/bitops.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #error only <linux/bitops.h> can be included directly | 22 | #error only <linux/bitops.h> can be included directly |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #include <asm-generic/bitops/hweight.h> | ||
| 26 | |||
| 25 | #include <asm-generic/bitops/atomic.h> | 27 | #include <asm-generic/bitops/atomic.h> |
| 26 | 28 | ||
| 27 | #endif /* __TOOLS_ASM_GENERIC_BITOPS_H */ | 29 | #endif /* __TOOLS_ASM_GENERIC_BITOPS_H */ |
diff --git a/tools/include/asm-generic/bitops/arch_hweight.h b/tools/include/asm-generic/bitops/arch_hweight.h new file mode 100644 index 000000000000..318bb2b202b0 --- /dev/null +++ b/tools/include/asm-generic/bitops/arch_hweight.h | |||
| @@ -0,0 +1 @@ | |||
| #include "../../../../include/asm-generic/bitops/arch_hweight.h" | |||
diff --git a/tools/include/asm-generic/bitops/const_hweight.h b/tools/include/asm-generic/bitops/const_hweight.h new file mode 100644 index 000000000000..0afd644aff83 --- /dev/null +++ b/tools/include/asm-generic/bitops/const_hweight.h | |||
| @@ -0,0 +1 @@ | |||
| #include "../../../../include/asm-generic/bitops/const_hweight.h" | |||
diff --git a/tools/include/asm-generic/bitops/hweight.h b/tools/include/asm-generic/bitops/hweight.h new file mode 100644 index 000000000000..290120c01a8e --- /dev/null +++ b/tools/include/asm-generic/bitops/hweight.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_ | ||
| 2 | #define _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_ | ||
| 3 | |||
| 4 | #include <asm-generic/bitops/arch_hweight.h> | ||
| 5 | #include <asm-generic/bitops/const_hweight.h> | ||
| 6 | |||
| 7 | #endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS_HWEIGHT_H_ */ | ||
diff --git a/tools/include/linux/bitops.h b/tools/include/linux/bitops.h index 26005a15e7e2..5ad9ee1dd7f6 100644 --- a/tools/include/linux/bitops.h +++ b/tools/include/linux/bitops.h | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | #ifndef _TOOLS_LINUX_BITOPS_H_ | 1 | #ifndef _TOOLS_LINUX_BITOPS_H_ |
| 2 | #define _TOOLS_LINUX_BITOPS_H_ | 2 | #define _TOOLS_LINUX_BITOPS_H_ |
| 3 | 3 | ||
| 4 | #include <asm/types.h> | ||
| 4 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
| 5 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
| 6 | #include <asm/hweight.h> | ||
| 7 | 7 | ||
| 8 | #ifndef __WORDSIZE | 8 | #ifndef __WORDSIZE |
| 9 | #define __WORDSIZE (__SIZEOF_LONG__ * 8) | 9 | #define __WORDSIZE (__SIZEOF_LONG__ * 8) |
| @@ -19,6 +19,11 @@ | |||
| 19 | #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) | 19 | #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) |
| 20 | #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE) | 20 | #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE) |
| 21 | 21 | ||
| 22 | extern unsigned int __sw_hweight8(unsigned int w); | ||
| 23 | extern unsigned int __sw_hweight16(unsigned int w); | ||
| 24 | extern unsigned int __sw_hweight32(unsigned int w); | ||
| 25 | extern unsigned long __sw_hweight64(__u64 w); | ||
| 26 | |||
| 22 | /* | 27 | /* |
| 23 | * Include this here because some architectures need generic_ffs/fls in | 28 | * Include this here because some architectures need generic_ffs/fls in |
| 24 | * scope | 29 | * scope |
diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c index a74fba6d7743..86ea2d7b8845 100644 --- a/tools/lib/api/fs/debugfs.c +++ b/tools/lib/api/fs/debugfs.c | |||
| @@ -67,7 +67,7 @@ int debugfs_valid_mountpoint(const char *debugfs) | |||
| 67 | 67 | ||
| 68 | if (statfs(debugfs, &st_fs) < 0) | 68 | if (statfs(debugfs, &st_fs) < 0) |
| 69 | return -ENOENT; | 69 | return -ENOENT; |
| 70 | else if (st_fs.f_type != (long) DEBUGFS_MAGIC) | 70 | else if ((long)st_fs.f_type != (long)DEBUGFS_MAGIC) |
| 71 | return -ENOENT; | 71 | return -ENOENT; |
| 72 | 72 | ||
| 73 | return 0; | 73 | return 0; |
diff --git a/tools/lib/api/fs/fs.c b/tools/lib/api/fs/fs.c index 65d9be3f9887..128ef6332a6b 100644 --- a/tools/lib/api/fs/fs.c +++ b/tools/lib/api/fs/fs.c | |||
| @@ -79,7 +79,7 @@ static int fs__valid_mount(const char *fs, long magic) | |||
| 79 | 79 | ||
| 80 | if (statfs(fs, &st_fs) < 0) | 80 | if (statfs(fs, &st_fs) < 0) |
| 81 | return -ENOENT; | 81 | return -ENOENT; |
| 82 | else if (st_fs.f_type != magic) | 82 | else if ((long)st_fs.f_type != magic) |
| 83 | return -ENOENT; | 83 | return -ENOENT; |
| 84 | 84 | ||
| 85 | return 0; | 85 | return 0; |
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 83e2887f91a3..fbbfdc39271d 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST | |||
| @@ -6,12 +6,15 @@ tools/lib/symbol/kallsyms.c | |||
| 6 | tools/lib/symbol/kallsyms.h | 6 | tools/lib/symbol/kallsyms.h |
| 7 | tools/lib/util/find_next_bit.c | 7 | tools/lib/util/find_next_bit.c |
| 8 | tools/include/asm/bug.h | 8 | tools/include/asm/bug.h |
| 9 | tools/include/asm-generic/bitops/arch_hweight.h | ||
| 9 | tools/include/asm-generic/bitops/atomic.h | 10 | tools/include/asm-generic/bitops/atomic.h |
| 11 | tools/include/asm-generic/bitops/const_hweight.h | ||
| 10 | tools/include/asm-generic/bitops/__ffs.h | 12 | tools/include/asm-generic/bitops/__ffs.h |
| 11 | tools/include/asm-generic/bitops/__fls.h | 13 | tools/include/asm-generic/bitops/__fls.h |
| 12 | tools/include/asm-generic/bitops/find.h | 14 | tools/include/asm-generic/bitops/find.h |
| 13 | tools/include/asm-generic/bitops/fls64.h | 15 | tools/include/asm-generic/bitops/fls64.h |
| 14 | tools/include/asm-generic/bitops/fls.h | 16 | tools/include/asm-generic/bitops/fls.h |
| 17 | tools/include/asm-generic/bitops/hweight.h | ||
| 15 | tools/include/asm-generic/bitops.h | 18 | tools/include/asm-generic/bitops.h |
| 16 | tools/include/linux/bitops.h | 19 | tools/include/linux/bitops.h |
| 17 | tools/include/linux/compiler.h | 20 | tools/include/linux/compiler.h |
| @@ -19,6 +22,8 @@ tools/include/linux/export.h | |||
| 19 | tools/include/linux/hash.h | 22 | tools/include/linux/hash.h |
| 20 | tools/include/linux/log2.h | 23 | tools/include/linux/log2.h |
| 21 | tools/include/linux/types.h | 24 | tools/include/linux/types.h |
| 25 | include/asm-generic/bitops/arch_hweight.h | ||
| 26 | include/asm-generic/bitops/const_hweight.h | ||
| 22 | include/asm-generic/bitops/fls64.h | 27 | include/asm-generic/bitops/fls64.h |
| 23 | include/asm-generic/bitops/__fls.h | 28 | include/asm-generic/bitops/__fls.h |
| 24 | include/asm-generic/bitops/fls.h | 29 | include/asm-generic/bitops/fls.h |
| @@ -29,6 +34,7 @@ include/linux/list.h | |||
| 29 | include/linux/hash.h | 34 | include/linux/hash.h |
| 30 | include/linux/stringify.h | 35 | include/linux/stringify.h |
| 31 | lib/find_next_bit.c | 36 | lib/find_next_bit.c |
| 37 | lib/hweight.c | ||
| 32 | lib/rbtree.c | 38 | lib/rbtree.c |
| 33 | include/linux/swab.h | 39 | include/linux/swab.h |
| 34 | arch/*/include/asm/unistd*.h | 40 | arch/*/include/asm/unistd*.h |
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 67a03a825b3c..aa6a50447c32 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
| @@ -232,12 +232,15 @@ LIB_H += ../include/linux/hash.h | |||
| 232 | LIB_H += ../../include/linux/stringify.h | 232 | LIB_H += ../../include/linux/stringify.h |
| 233 | LIB_H += util/include/linux/bitmap.h | 233 | LIB_H += util/include/linux/bitmap.h |
| 234 | LIB_H += ../include/linux/bitops.h | 234 | LIB_H += ../include/linux/bitops.h |
| 235 | LIB_H += ../include/asm-generic/bitops/arch_hweight.h | ||
| 235 | LIB_H += ../include/asm-generic/bitops/atomic.h | 236 | LIB_H += ../include/asm-generic/bitops/atomic.h |
| 237 | LIB_H += ../include/asm-generic/bitops/const_hweight.h | ||
| 236 | LIB_H += ../include/asm-generic/bitops/find.h | 238 | LIB_H += ../include/asm-generic/bitops/find.h |
| 237 | LIB_H += ../include/asm-generic/bitops/fls64.h | 239 | LIB_H += ../include/asm-generic/bitops/fls64.h |
| 238 | LIB_H += ../include/asm-generic/bitops/fls.h | 240 | LIB_H += ../include/asm-generic/bitops/fls.h |
| 239 | LIB_H += ../include/asm-generic/bitops/__ffs.h | 241 | LIB_H += ../include/asm-generic/bitops/__ffs.h |
| 240 | LIB_H += ../include/asm-generic/bitops/__fls.h | 242 | LIB_H += ../include/asm-generic/bitops/__fls.h |
| 243 | LIB_H += ../include/asm-generic/bitops/hweight.h | ||
| 241 | LIB_H += ../include/asm-generic/bitops.h | 244 | LIB_H += ../include/asm-generic/bitops.h |
| 242 | LIB_H += ../include/linux/compiler.h | 245 | LIB_H += ../include/linux/compiler.h |
| 243 | LIB_H += ../include/linux/log2.h | 246 | LIB_H += ../include/linux/log2.h |
| @@ -255,7 +258,6 @@ LIB_H += util/include/linux/linkage.h | |||
