summaryrefslogtreecommitdiff
path: root/tools/perf/util/callchain.h
diff options
context:
space:
mode:
authorJin Yao <yao.jin@linux.intel.com>2020-10-09 05:28:41 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-10-14 19:31:56 +0300
commit47ef8398c369fa77e0fdbadfebb3885879491721 (patch)
tree75c63ae3cd6412a4704cc9d786191759ea5d377c /tools/perf/util/callchain.h
parentdd1d841810158086086417133a22c90dfabaeecb (diff)
downloadlinux-47ef8398c369fa77e0fdbadfebb3885879491721.tar.xz
perf streams: Compare two streams
Stream is the branch history which is aggregated by the branch records from perf samples. Now we support the callchain as stream. If the callchain entries of one stream are fully matched with the callchain entries of another stream, we think two streams are matched. For example, cycles: 1, hits: 26.80% cycles: 1, hits: 27.30% ----------------------- ----------------------- main div.c:39 main div.c:39 main div.c:44 main div.c:44 Above two streams are matched (we don't consider the case that source code is changed). The matching logic is, compare the chain string first. If it's not matched, fallback to dso address comparison. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20201009022845.13141-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/callchain.h')
-rw-r--r--tools/perf/util/callchain.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index fe36a9e5ccd1..ad27fc8c7948 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -298,4 +298,8 @@ int callchain_branch_counts(struct callchain_root *root,
u64 *abort_count, u64 *cycles_count);
void callchain_param_setup(u64 sample_type);
+
+bool callchain_cnode_matched(struct callchain_node *base_cnode,
+ struct callchain_node *pair_cnode);
+
#endif /* __PERF_CALLCHAIN_H */