Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1689935
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v10 1/7] perf/core: Define the common branch type classification |
| Date | 2017-07-18 11:40 +0200 |
| Message-ID | <u4x8Z-CI-1@gated-at.bofh.it> (permalink) |
| References | <u4s9j-616-1@gated-at.bofh.it> <u4s9j-616-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Jin Yao <yao.jin@linux.intel.com> writes: > It is often useful to know the branch types while analyzing branch > data. For example, a call is very different from a conditional branch. > > Currently we have to look it up in binary while the binary may later > not be available and even the binary is available but user has to take > some time. It is very useful for user to check it directly in perf > report. > > Perf already has support for disassembling the branch instruction > to get the x86 branch type. > > To keep consistent on kernel and userspace and make the classification > more common, the patch adds the common branch type classification > in perf_event.h. > > The patch only defines a minimum but most common set of branch types. > > PERF_BR_UNKNOWN : unknown > PERF_BR_COND :conditional > PERF_BR_UNCOND : unconditional > PERF_BR_IND : indirect > PERF_BR_CALL : function call > PERF_BR_IND_CALL : indirect function call > PERF_BR_RET : function return > PERF_BR_SYSCALL : syscall > PERF_BR_SYSRET : syscall return > PERF_BR_COND_CALL : conditional function call > PERF_BR_COND_RET : conditional function return > > The patch also adds a new field type (4 bits) in perf_branch_entry > to record the branch type. > > Since the disassembling of branch instruction needs some overhead, > a new PERF_SAMPLE_BRANCH_TYPE_SAVE is introduced to indicate if it > needs to disassemble the branch instruction and record the branch > type. > > Change log > ---------- > v10: Not changed. > > v9: Not changed. > > v8: Change PERF_BR_NONE to PERF_BR_UNKNOWN. > No other change. I acked v8, so you could have retained my ack. Here it is again: Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) cheers
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v10 0/7] perf report: Show branch type Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[PATCH v10 4/7] perf report: Refactor the branch info printing code Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf report: Refactor the branch info printing code tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:10 +0200
[PATCH v10 1/7] perf/core: Define the common branch type classification Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
Re: [PATCH v10 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-18 11:40 +0200
Re: [PATCH v10 1/7] perf/core: Define the common branch type classification Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-18 18:00 +0200
[tip:perf/core] perf/core: Define the common branch type classification tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:10 +0200
[PATCH v10 3/7] perf record: Create a new option save_type in --branch-filter Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf record: Create a new option save_type in --branch-filter tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:20 +0200
[PATCH v10 7/7] perf report: Show branch type in callchain entry Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf report: Show branch type in callchain entry tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:10 +0200
[PATCH v10 6/7] perf report: Show branch type statistics for stdio mode Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf report: Show branch type statistics for stdio mode tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:10 +0200
[PATCH v10 5/7] perf util: Create branch.c/.h for common branch functions Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf util: Create branch.c/.h for common branch functions tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:10 +0200
[PATCH v10 2/7] perf/x86/intel: Record branch type Jin Yao <yao.jin@linux.intel.com> - 2017-07-18 06:20 +0200
[tip:perf/core] perf/x86/intel: Record branch type tip-bot for Jin Yao <tipbot@zytor.com> - 2017-07-20 11:20 +0200
csiph-web