diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-05-29 16:33:30 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-06-19 16:03:33 -0300 |
commit | a5499b37197ab4b5fed101370df7ccadacbb4340 (patch) | |
tree | 6c7651403a51c38af7d62e5dadf04f106f4cf31a /tools/perf/util/machine.h | |
parent | 79928928c5a27d58ae48285d2a3f7aa835db7547 (diff) | |
download | linux-a5499b37197ab4b5fed101370df7ccadacbb4340.tar.bz2 |
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/machine.h')
-rw-r--r-- | tools/perf/util/machine.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index ca267c41f28d..cea62f6fb144 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h @@ -216,6 +216,9 @@ size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); int machine__for_each_thread(struct machine *machine, int (*fn)(struct thread *thread, void *p), void *priv); +int machines__for_each_thread(struct machines *machines, + int (*fn)(struct thread *thread, void *p), + void *priv); int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool, struct target *target, struct thread_map *threads, |