diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-25 04:04:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-25 04:04:22 -0400 |
commit | 42ebd27bcbda7895fa07c61185a26d8379945ed0 (patch) | |
tree | 51be64b0c2c0defd1a0ce3e6d55452dbd8a7aaae /tools | |
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')
-rw-r--r-- | tools/hv/hv_fcopy_daemon.c | 4 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 1 | ||||
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 4 | ||||
-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 |
9 files changed, 27 insertions, 5 deletions
diff --git a/tools/hv/hv_fcopy_daemon.c b/tools/hv/hv_fcopy_daemon.c index 4ecc4fd0bc1b..fba1c75aa484 100644 --- a/tools/hv/hv_fcopy_daemon.c +++ b/tools/hv/hv_fcopy_daemon.c | |||
@@ -82,8 +82,10 @@ static int hv_start_fcopy(struct hv_start_fcopy *smsg) | |||
82 | 82 | ||
83 | if (!access(target_fname, F_OK)) { | 83 | if (!access(target_fname, F_OK)) { |
84 | syslog(LOG_INFO, "File: %s exists", target_fname); | 84 | syslog(LOG_INFO, "File: %s exists", target_fname); |
85 | if (!smsg->copy_flags & OVER_WRITE) | 85 | if (!(smsg->copy_flags & OVER_WRITE)) { |
86 | error = HV_ERROR_ALREADY_EXISTS; | ||
86 | goto done; | 87 | goto done; |
88 | } | ||
87 | } | 89 | } |
88 | 90 | ||
89 | target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744); | 91 | target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744); |
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index baec7d887da4..b83184f2d484 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -4344,6 +4344,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event | |||
4344 | format, len_arg, arg); | 4344 | format, len_arg, arg); |
4345 | trace_seq_terminate(&p); | 4345 | trace_seq_terminate(&p); |
4346 | trace_seq_puts(s, p.buffer); | 4346 | trace_seq_puts(s, p.buffer); |
4347 | trace_seq_destroy(&p); | ||
4347 | arg = arg->next; | 4348 | arg = arg->next; |
4348 | break; | 4349 | break; |
4349 | default: | 4350 | default: |
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 791c539374c7..feab94281634 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h | |||
@@ -876,8 +876,8 @@ struct event_filter { | |||
876 | struct event_filter *pevent_filter_alloc(struct pevent *pevent); | 876 | struct event_filter *pevent_filter_alloc(struct pevent *pevent); |
877 | 877 | ||
878 | /* for backward compatibility */ | 878 | /* for backward compatibility */ |
879 | #define FILTER_NONE PEVENT_ERRNO__FILTER_NOT_FOUND | 879 | #define FILTER_NONE PEVENT_ERRNO__NO_FILTER |
880 | #define FILTER_NOEXIST PEVENT_ERRNO__NO_FILTER | 880 | #define FILTER_NOEXIST PEVENT_ERRNO__FILTER_NOT_FOUND |
881 | #define FILTER_MISS PEVENT_ERRNO__FILTER_MISS | 881 | #define FILTER_MISS PEVENT_ERRNO__FILTER_MISS |
882 | #define FILTER_MATCH PEVENT_ERRNO__FILTER_MATCH | 882 | #define FILTER_MATCH PEVENT_ERRNO__FILTER_MATCH |
883 | 883 | ||
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, | |||
26 | map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp); | 26 | map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp); |
27 | if (!map) { | 27 | if (!map) { |
28 | pr_debug("failed to get stack map\n"); | 28 | pr_debug("failed to get stack map\n"); |
29 | free(buf); | ||
29 | return -1; | 30 | return -1; |
30 | } | 31 | } |
31 | 32 | ||
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) | |||
404 | } | 404 | } |
405 | 405 | ||
406 | event->key = *key; | 406 | event->key = *key; |
407 | init_stats(&event->total.stats); | ||
407 | return event; | 408 | return event; |
408 | } | 409 | } |
409 | 410 | ||
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) | |||
374 | 374 | ||
375 | session = perf_session__new(file, false, NULL); | 375 | session = perf_session__new(file, false, NULL); |
376 | if (session == NULL) { | 376 | if (session == NULL) { |
377 | pr_err("Not enough memory for reading perf file header\n"); | 377 | pr_err("Perf session creation failed.\n"); |
378 | return -1; | 378 | return -1; |
379 | } | 379 | } |
380 | 380 | ||
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) | |||
34 | LIBUNWIND_LIBS = -lunwind -lunwind-arm | 34 | LIBUNWIND_LIBS = -lunwind -lunwind-arm |
35 | endif | 35 | endif |
36 | 36 | ||
37 | # So far there's only x86 libdw unwind support merged in perf. | ||
38 | # Disable it on all other architectures in case libdw unwind | ||
39 | # support is detected in system. Add supported architectures | ||
40 | # to the check. | ||
41 | ifneq ($(ARCH),x86) | ||
42 | NO_LIBDW_DWARF_UNWIND := 1 | ||
43 | endif | ||
44 | |||
37 | ifeq ($(LIBUNWIND_LIBS),) | 45 | ifeq ($(LIBUNWIND_LIBS),) |
38 | NO_LIBUNWIND := 1 | 46 | NO_LIBUNWIND := 1 |
39 | else | 47 | 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) | |||
86 | 86 | ||
87 | static int open_file_write(struct perf_data_file *file) | 87 | static int open_file_write(struct perf_data_file *file) |
88 | { | 88 | { |
89 | int fd; | ||
90 | |||
89 | if (check_backup(file)) | 91 | if (check_backup(file)) |
90 | return -1; | 92 | return -1; |
91 | 93 | ||
92 | return open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); | 94 | fd = open(file->path, O_CREAT|O_RDWR|O_TRUNC, S_IRUSR|S_IWUSR); |
95 | |||
96 | if (fd < 0) | ||
97 | pr_err("failed to open %s : %s\n", file->path, strerror(errno)); | ||
98 | |||
99 | return fd; | ||
93 | } | 100 | } |
94 | 101 | ||
95 | static int open_file(struct perf_data_file *file) | 102 | 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 @@ | |||
6 | #include <inttypes.h> | 6 | #include <inttypes.h> |
7 | 7 | ||
8 | #include "symbol.h" | 8 | #include "symbol.h" |
9 | #include "vdso.h" | ||
9 | #include <symbol/kallsyms.h> | 10 | #include <symbol/kallsyms.h> |
10 | #include "debug.h" | 11 | #include "debug.h" |
11 | 12 | ||
@@ -618,6 +619,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name, | |||
618 | GElf_Shdr shdr; | 619 | GElf_Shdr shdr; |
619 | ss->adjust_symbols = (ehdr.e_type == ET_EXEC || | 620 | ss->adjust_symbols = (ehdr.e_type == ET_EXEC || |
620 | ehdr.e_type == ET_REL || | 621 | ehdr.e_type == ET_REL || |
622 | is_vdso_map(dso->short_name) || | ||
621 | elf_section_by_name(elf, &ehdr, &shdr, | 623 | elf_section_by_name(elf, &ehdr, &shdr, |
622 | ".gnu.prelink_undo", | 624 | ".gnu.prelink_undo", |
623 | NULL) != NULL); | 625 | NULL) != NULL); |