diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-23 09:08:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-23 09:08:00 -0400 |
commit | 89b90ee37a76a2bb05cc8ced30364b0de001f523 (patch) | |
tree | 4cbeb36061e60e81e77674eaa18dfa39c443de9a /tools | |
parent | 4d0fa8a0f01272d4de33704f20303dcecdb55df1 (diff) | |
parent | de04f8657de9d3351a2d5880f1f7080b23b798cf (diff) |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/urgent
Pull perf/urgent fixes from Jiri Olsa:
* Fix memory leak and backward compatibility macros for pevent
filter enums in traceevent library (Steven Rostedt)
* Disable libdw unwind for all but x86 arch (Jiri Olsa)
* Fix memory leak in sample_ustack (Masanari Iida)
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-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/config/Makefile | 8 |
4 files changed, 12 insertions, 2 deletions
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/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 |