From: Arnaldo Carvalho de Melo Date: Tue, 22 Jan 2019 12:58:22 +0000 (-0200) Subject: perf tools: Move branch structs to branch.h X-Git-Tag: v5.4-rc1~1528^2~28^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f1a397f33743bbb7346cb01e41cc70ca318426e8;p=platform%2Fkernel%2Flinux-rpi.git perf tools: Move branch structs to branch.h We already have it, move those there from events.h so that we untangle the header dependencies a bit more. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-pnbkqo8jxbi49d4f3yd3b5w3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/branch.h b/tools/perf/util/branch.h index 1e3c7c5..64f96b7 100644 --- a/tools/perf/util/branch.h +++ b/tools/perf/util/branch.h @@ -1,8 +1,31 @@ #ifndef _PERF_BRANCH_H #define _PERF_BRANCH_H 1 +#include #include -#include "../perf.h" +#include +#include + +struct branch_flags { + u64 mispred:1; + u64 predicted:1; + u64 in_tx:1; + u64 abort:1; + u64 cycles:16; + u64 type:4; + u64 reserved:40; +}; + +struct branch_entry { + u64 from; + u64 to; + struct branch_flags flags; +}; + +struct branch_stack { + u64 nr; + struct branch_entry entries[0]; +}; struct branch_type_stat { bool branch_to; @@ -13,8 +36,6 @@ struct branch_type_stat { u64 cross_2m; }; -struct branch_flags; - void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags, u64 from, u64 to); diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index dad32b8..feba1aa 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -161,26 +161,7 @@ struct ip_callchain { u64 ips[0]; }; -struct branch_flags { - u64 mispred:1; - u64 predicted:1; - u64 in_tx:1; - u64 abort:1; - u64 cycles:16; - u64 type:4; - u64 reserved:40; -}; - -struct branch_entry { - u64 from; - u64 to; - struct branch_flags flags; -}; - -struct branch_stack { - u64 nr; - struct branch_entry entries[0]; -}; +struct branch_stack; enum { PERF_IP_FLAG_BRANCH = 1ULL << 0, diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 277841e..956d991 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -12,6 +12,7 @@ #include #include #include +#include "branch.h" #include "build-id.h" #include "event.h" #include "path.h"