summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread-stack.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-05-29 16:33:30 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-19 16:03:33 -0300
commita5499b37197ab4b5fed101370df7ccadacbb4340 (patch)
tree6c7651403a51c38af7d62e5dadf04f106f4cf31a /tools/perf/util/thread-stack.h
parent79928928c5a27d58ae48285d2a3f7aa835db7547 (diff)
downloadop-kernel-dev-a5499b37197ab4b5fed101370df7ccadacbb4340.zip
op-kernel-dev-a5499b37197ab4b5fed101370df7ccadacbb4340.tar.gz
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 b843bbe..e1528f1 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 *
OpenPOWER on IntegriCloud