diff options
author | Jin Yao <yao.jin@linux.intel.com> | 2017-07-18 20:13:13 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-07-18 23:14:40 -0300 |
commit | 992c7e9267c12a8e301152c5569028ff8d535322 (patch) | |
tree | c8dc33d9bfc3ec9fc48abc506ea74ef5e61190a3 /tools/perf/util/Build | |
parent | 8d51735fcd2be1791c0bfe2d581d9063281fe7fb (diff) | |
download | linux-992c7e9267c12a8e301152c5569028ff8d535322.tar.bz2 |
perf util: Create branch.c/.h for common branch functions
Create new util/branch.c and util/branch.h to contain the common branch
functions. Such as:
branch_type_count(): Count the numbers of branch types
branch_type_name() : Return the name of branch type
branch_type_stat_display(): Display branch type statistics info
branch_type_str(): Construct the branch type string.
The branch type is saved in branch_flags.
Change log:
v8: Change PERF_BR_NONE to PERF_BR_UNKNOWN.
v7: Since the common branch type name is changed (e.g. JCC->COND),
this patch is performed the modification accordingly.
v6: Move that multiline conditional code inside {} brackets.
Move branch_type_stat_display() from builtin-report.c to
branch.c.
Move branch_type_str() from callchain.c to branch.c.
v5: It's a new patch in v5 patch series.
Signed-off-by: Yao Jin <yao.jin@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1500379995-6449-6-git-send-email-yao.jin@linux.intel.com
[ Don't use 'index' and 'stat' as names for variables, it shadows global decls in older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/Build')
-rw-r--r-- | tools/perf/util/Build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 7580fe4d5d30..8d49a989f193 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -93,6 +93,7 @@ libperf-y += drv_configs.o libperf-y += units.o libperf-y += time-utils.o libperf-y += expr-bison.o +libperf-y += branch.o libperf-$(CONFIG_LIBBPF) += bpf-loader.o libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o |