OSDN Git Service

perf tools: Improve thread_stack__process() for trace begin / end
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 20 Sep 2018 13:00:46 +0000 (16:00 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 20 Sep 2018 18:19:50 +0000 (15:19 -0300)
commit2dcde4e152a3e319cc7e76c7c6b8548a3c72310d
tree6ebe31b385864270f308e44b40e063c27fabe34d
parent4d60e5e36aa6f11b4d9eadc5d2b94128f24870c7
perf tools: Improve thread_stack__process() for trace begin / end

thread_stack__process() is used to create call paths for database
export.  Improve the handling of trace begin / end to allow for a trace
that ends in a call.

Previously, the Intel PT decoder would indicate begin / end by a branch
from / to zero. That hides useful information, in particular when a
trace ends with a call. Before remedying that, enhance the thread stack
so that it identifies the trace end by the flag instead of by ip == 0.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20180920130048.31432-5-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/thread-stack.c