From: Ingo Molnar Date: Sat, 17 Oct 2009 07:58:25 +0000 (+0200) Subject: Merge commit 'v2.6.32-rc5' into perf/probes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bb3c3e807140816b5f5fd4840473ee52a916ad4f;p=openwrt%2Fstaging%2Fblogic.git Merge commit 'v2.6.32-rc5' into perf/probes Conflicts: kernel/trace/trace_event_profile.c Merge reason: update to -rc5 and resolve conflict. Signed-off-by: Ingo Molnar --- bb3c3e807140816b5f5fd4840473ee52a916ad4f diff --cc kernel/trace/trace_event_profile.c index e812f1c1264c,8d5c171cc998..c9f687ab0d4f --- a/kernel/trace/trace_event_profile.c +++ b/kernel/trace/trace_event_profile.c @@@ -45,15 -45,20 +45,20 @@@ static int ftrace_profile_enable_event( rcu_assign_pointer(trace_profile_buf_nmi, buf); } - ret = event->profile_enable(); + ret = event->profile_enable(event); - if (!ret) + if (!ret) { + total_profile_count++; return 0; + } - kfree(trace_profile_buf_nmi); fail_buf_nmi: - kfree(trace_profile_buf); + if (!total_profile_count) { + free_percpu(trace_profile_buf_nmi); + free_percpu(trace_profile_buf); + trace_profile_buf_nmi = NULL; + trace_profile_buf = NULL; + } fail_buf: - total_profile_count--; atomic_dec(&event->profile_count); return ret; diff --cc tools/perf/Makefile index 1abbf9a5ee57,742a32eee8fc..1811a7015f9c --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@@ -418,18 -423,9 +425,18 @@@ ifeq ($(uname_S),Darwin endif ifneq ($(shell sh -c "(echo '\#include '; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) - msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel); + msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); endif +ifneq ($(shell sh -c "(echo '\#include '; echo '\#include '; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) + msg := $(warning No libdwarf.h found or old libdwarf.h found, disables dwarf support. Please install libdwarf-dev/libdwarf-devel >= 20081231); + BASIC_CFLAGS += -DNO_LIBDWARF +else + EXTLIBS += -lelf -ldwarf + LIB_H += util/probe-finder.h + LIB_OBJS += util/probe-finder.o +endif + ifdef NO_DEMANGLE BASIC_CFLAGS += -DNO_DEMANGLE else