summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread-stack.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-05-29 15:33:30 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-19 21:03:33 +0200
commita5499b37197ab4b5fed101370df7ccadacbb4340 (patch)
tree6c7651403a51c38af7d62e5dadf04f106f4cf31a /tools/perf/util/thread-stack.h
parentMerge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadlinux-a5499b37197ab4b5fed101370df7ccadacbb4340.tar.xz
linux-a5499b37197ab4b5fed101370df7ccadacbb4340.zip
perf tools: Ensure thread-stack is flushed
The thread-stack represents a thread's current stack. When a thread exits there can still be many functions on the stack e.g. exit() can be called many levels deep, so all the callers will never return. To get that information output, the thread-stack must be flushed. Previously it was assumed the thread-stack would be flushed when the struct thread was deleted. With thread ref-counting it is no longer clear when that will be, if ever. So instead explicitly flush all the thread-stacks at the end of a session. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1432906425-9911-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread-stack.h')
-rw-r--r--tools/perf/util/thread-stack.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/thread-stack.h b/tools/perf/util/thread-stack.h
index b843bbef8ba2..e1528f1374c3 100644
--- a/tools/perf/util/thread-stack.h
+++ b/tools/perf/util/thread-stack.h
@@ -96,6 +96,7 @@ int thread_stack__event(struct thread *thread, u32 flags, u64 from_ip,
void thread_stack__set_trace_nr(struct thread *thread, u64 trace_nr);
void thread_stack__sample(struct thread *thread, struct ip_callchain *chain,
size_t sz, u64 ip);
+int thread_stack__flush(struct thread *thread);
void thread_stack__free(struct thread *thread);
struct call_return_processor *