summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/db-export.h
diff options
context:
space:
mode:
authorChris Phlipot <cphlipot0@gmail.com>2016-04-28 10:19:08 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-05-06 18:00:52 +0200
commit0a3eba3ad613fa9d5af754f7ae8c4b46047cb2a7 (patch)
treee561633b72418e54b68c5d0e00816538d9e88a93 /tools/perf/util/db-export.h
parentperf tools: Refactor code to move call path handling out of thread-stack (diff)
downloadlinux-0a3eba3ad613fa9d5af754f7ae8c4b46047cb2a7.tar.xz
linux-0a3eba3ad613fa9d5af754f7ae8c4b46047cb2a7.zip
perf script: Enable db export to output sampled callchains
This change enables the db export api to export callchains. This is accomplished by adding callchains obtained from samples to the call_path_root structure and exporting them via the current call path export API. While the current API does support exporting call paths, this is not supported when sampling. This commit addresses that missing feature by allowing the export of call paths when callchains are present in samples. Summary: - This feature is activated by initializing the call_path_root member inside the db_export structure to a non-null value. - Callchains are resolved with thread__resolve_callchain() and then stored and exported by adding a call path under call path root. - Symbol and DSO for each callchain node are exported via db_ids_from_al() This commit puts in place infrastructure to be used by subsequent commits, and by itself, does not introduce any user-visible changes. Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1461831551-12213-4-git-send-email-cphlipot0@gmail.com [ Made adjustments suggested by Adrian Hunter, see thread via this cset's Link: tag ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/db-export.h')
-rw-r--r--tools/perf/util/db-export.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/db-export.h b/tools/perf/util/db-export.h
index 25e22fd76aca..f5daf552054c 100644
--- a/tools/perf/util/db-export.h
+++ b/tools/perf/util/db-export.h
@@ -27,6 +27,7 @@ struct dso;
struct perf_sample;
struct addr_location;
struct call_return_processor;
+struct call_path_root;
struct call_path;
struct call_return;
@@ -64,6 +65,7 @@ struct db_export {
int (*export_call_return)(struct db_export *dbe,
struct call_return *cr);
struct call_return_processor *crp;
+ struct call_path_root *cpr;
u64 evsel_last_db_id;
u64 machine_last_db_id;
u64 thread_last_db_id;