aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/unwind.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-07-04 14:16:22 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-04 20:27:12 -0300
commita2873325ffb21cecca8032673eb698cb4d778dc6 (patch)
treea71d006f2ccebeefa1cd52a1e38a1dba5fa81e25 /tools/perf/util/unwind.h
parentperf tests: Fix hist accumulation test (diff)
downloadlinux-dev-a2873325ffb21cecca8032673eb698cb4d778dc6.tar.xz
linux-dev-a2873325ffb21cecca8032673eb698cb4d778dc6.zip
perf unwind: Add initialized arg into unwind__prepare_access
Adding initialized arg into unwind__prepare_access to get feedback about the initialization state. It's not possible to get it from error code, because we return 0 even in case we don't recognize dso, which is valid. The 'initialized' value is used in following patch to speedup unwind__prepare_access calls logic in fork path. 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-4-git-send-email-jolsa@kernel.org [ Remove ; after static inline function signatures, fixes build break ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/unwind.h')
-rw-r--r--tools/perf/util/unwind.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index 84c6d44d52f9..61fb1e90ff51 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -42,12 +42,14 @@ int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
#endif
int LIBUNWIND__ARCH_REG_ID(int regnum);
-int unwind__prepare_access(struct thread *thread, struct map *map);
+int unwind__prepare_access(struct thread *thread, struct map *map,
+ bool *initialized);
void unwind__flush_access(struct thread *thread);
void unwind__finish_access(struct thread *thread);
#else
static inline int unwind__prepare_access(struct thread *thread __maybe_unused,
- struct map *map __maybe_unused)
+ struct map *map __maybe_unused,
+ bool *initialized __maybe_unused)
{
return 0;
}
@@ -67,7 +69,8 @@ unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
}
static inline int unwind__prepare_access(struct thread *thread __maybe_unused,
- struct map *map __maybe_unused)
+ struct map *map __maybe_unused,
+ bool *initialized __maybe_unused)
{
return 0;
}