diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-25 10:04:22 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-25 10:04:22 +0200 |
commit | 42ebd27bcbda7895fa07c61185a26d8379945ed0 (patch) | |
tree | 51be64b0c2c0defd1a0ce3e6d55452dbd8a7aaae /tools/perf | |
parent | a81fef347b32dea2b31275826afe1c93fa0d2d54 (diff) | |
parent | 9f7ff8931e3c5ddc8535476971ec9501e9555c05 (diff) |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/arch/x86/tests/dwarf-unwind.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-kvm.c | 1 | ||||
-rw-r--r-- | tools/perf/builtin-record.c | 2 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 8 | ||||
-rw-r--r-- | tools/perf/util/data.c | 9 | ||||
-rw-r--r-- | tools/perf/util/symbol-elf.c | 2 |
6 files changed, 21 insertions, 2 deletions
diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c index b602ad93ce63..b8c0102c70c8 100644 --- a/tools/perf/arch/x86/tests/dwarf-unwind.c +++ b/tools/perf/arch/x86/tests/dwarf-unwind.c @@ -26,6 +26,7 @@ static int sample_ustack(struct perf_sample *sample, map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp); if (!map) { pr_debug("failed to get stack map\n"); + free(buf); return -1; } diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 21c164b8f9db..0f1e5a2f6ad7 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -404,6 +404,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key) } event->key = *key; + init_stats(&event->total.stats); return event; } diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index eb524f91bffe..8ce62ef7f6c3 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -374,7 +374,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) session = perf_session__new(file, false, NULL); if (session == NULL) { - pr_err("Not enough memory for reading perf file header\n"); + pr_err("Perf session creation failed.\n"); return -1; } diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index ee21fa95ebcf..a71fb395e38f 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -34,6 +34,14 @@ ifeq ($(ARCH),arm) LIBUNWIND_LIBS = -lunwind -lunwind-arm endif +# So far there's only x86 libdw unwind support merged in perf. +# Disable it on all other architectures in case libdw unwind +# support is detected in system. Add supported architectures +# to the check. +ifneq ($(ARCH),x86) + NO_LIBDW_DWARF_UNWIND := 1 +endif + ifeq ($(LIBUNWIND_LIBS),) NO_LIBUNWIND := 1 else diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c index 1fbcd8bdc11b..55de44ecebef 100644 --- a/tools/perf/util/data.c +++ b/tools/perf/util/data.c @@ -86,10 +86,17 @@ static int open_file_read(struct perf_data_file *file) static int open_file_write(struct perf_data_file *file) { + int fd; + if (check_backup(file)) return -1; - return open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); + fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); + + if (fd < 0) + pr_err("failed to open %s : %s\n", file->path, strerror(errno)); + + return fd; } static int open_file(struct perf_data_file *file) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 3b7dbf51d4a9..6864661a79dd 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -6,6 +6,7 @@ #include <inttypes.h> #include "symbol.h" +#include "vdso.h" #include <symbol/kallsyms.h> #include "debug.h" @@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, GElf_Shdr shdr; ss->adjust_symbols = (ehdr.e_type == ET_EXEC || ehdr.e_type == ET_REL || + is_vdso_map(dso->short_name) || elf_section_by_name(elf, &ehdr, &shdr, ".gnu.prelink_undo", NULL) != NULL); |