Skip to content

Commit

Permalink
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/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>
  • Loading branch information
Ingo Molnar committed Apr 23, 2014
2 parents 4d0fa8a + de04f86 commit 89b90ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4344,6 +4344,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
format, len_arg, arg);
trace_seq_terminate(&p);
trace_seq_puts(s, p.buffer);
trace_seq_destroy(&p);
arg = arg->next;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions tools/lib/traceevent/event-parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,8 @@ struct event_filter {
struct event_filter *pevent_filter_alloc(struct pevent *pevent);

/* for backward compatibility */
#define FILTER_NONE PEVENT_ERRNO__FILTER_NOT_FOUND
#define FILTER_NOEXIST PEVENT_ERRNO__NO_FILTER
#define FILTER_NONE PEVENT_ERRNO__NO_FILTER
#define FILTER_NOEXIST PEVENT_ERRNO__FILTER_NOT_FOUND
#define FILTER_MISS PEVENT_ERRNO__FILTER_MISS
#define FILTER_MATCH PEVENT_ERRNO__FILTER_MATCH

Expand Down
1 change: 1 addition & 0 deletions tools/perf/arch/x86/tests/dwarf-unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 8 additions & 0 deletions tools/perf/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89b90ee

Please sign in to comment.