]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Ensure thread-stack is flushed
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 29 May 2015 13:33:30 +0000 (16:33 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Jun 2015 19:03:33 +0000 (16:03 -0300)
commitac41f5689f43d4c157f8c5df6cab774e2d3b14c2
tree6c7651403a51c38af7d62e5dadf04f106f4cf31a
parentf54786e37111eb44d7f0041e2db09a587980a7ba
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>
tools/perf/util/machine.c
tools/perf/util/machine.h
tools/perf/util/session.c
tools/perf/util/thread-stack.c
tools/perf/util/thread-stack.h