perf unwind: Call unwind__prepare_access for forked thread
authorJiri Olsa <jolsa@kernel.org>
Mon, 4 Jul 2016 12:16:23 +0000 (14:16 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Jul 2016 23:27:25 +0000 (20:27 -0300)
commit6c502584438bda63fc1a67606854fb0b300465cd
tree670c04d2c278b314f4698922f6778aa73c6e963d
parenta2873325ffb21cecca8032673eb698cb4d778dc6
perf unwind: Call unwind__prepare_access for forked thread

Currently we call unwind__prepare_access for map event.  In case we
report fork event the thread inherits its parent's maps and
unwind__prepare_access is never called for the thread.

This causes unwind__get_entries seeing uninitialized
unwind_libunwind_ops and thus returning no callchain.

Adding unwind__prepare_access calls for fork even processing.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1467634583-29147-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/map.c
tools/perf/util/map.h
tools/perf/util/thread.c