aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/builtin-kmem.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-05-09 08:10:36 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-09 08:10:36 +0200
commit32b0ed3ae66cd6114f8510161f833f05518c0395 (patch)
treef251ef653105de7fa02f0212c30a40e967fa339f /tools/perf/builtin-kmem.c
parentperf_event: Don't allow vmalloc() backed perf on powerpc (diff)
parentperf build: Disable libdw DWARF unwind when built with NO_DWARF (diff)
downloadwireguard-linux-32b0ed3ae66cd6114f8510161f833f05518c0395.tar.xz
wireguard-linux-32b0ed3ae66cd6114f8510161f833f05518c0395.zip
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - 'perf probe' improvements: (Masami Hiramatsu) - Support glob wildcards for function name - Support $params special probe argument: Collect all function arguments - Make --line checks validate C-style function name. - Add --no-inlines option to avoid searching inline functions - Introduce new 'perf bench futex' benchmark: 'wake-parallel', to measure parallel waker threads generating contention for kernel locks (hb->lock). (Davidlohr Bueso) Bug fixes: - Improve 'perf top' to survive much longer on high core count machines, more work needed to refcount more data structures besides 'struct thread' and fix more races. (Arnaldo Carvalho de Melo) Infrastructure changes: - Move barrier.h mb/rmb/wmb API from tools/perf/ to kernel like tools/arch/ hierarchy. (Arnaldo Carvalho de Melo) - Borrow atomic.h from the kernel, initially the x86 implementations with a fallback to gcc intrinsics for the other arches, all the kernel like framework in place for doing arch specific implementations, preferrably cloning what is in the kernel to the greater extent possible. (Arnaldo Carvalho de Melo) - Protect the 'struct thread' lifetime with a reference counter, and protect data structures that contains its instances with a mutex. (Arnaldo Carvalho de Melo - Disable libdw DWARF unwind when built with NO_DWARF (Naveen N. Rao) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r--tools/perf/builtin-kmem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index e628bf1a0c24..fe3fcb75f20a 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -906,6 +906,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
struct perf_evsel *evsel,
struct machine *machine)
{
+ int err = 0;
struct thread *thread = machine__findnew_thread(machine, sample->pid,
sample->tid);
@@ -919,10 +920,12 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
if (evsel->handler != NULL) {
tracepoint_handler f = evsel->handler;
- return f(evsel, sample);
+ err = f(evsel, sample);
}
- return 0;
+ thread__put(thread);
+
+ return err;
}
static struct perf_tool perf_kmem = {