Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685688

Re: [PATCH v7 1/7] perf/core: Define the common branch type classification

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [PATCH v7 1/7] perf/core: Define the common branch type classification
Date 2017-07-12 12:50 +0200
Message-ID <u2nnr-76E-3@gated-at.bofh.it> (permalink)
References <u1XsZ-7CX-3@gated-at.bofh.it> <u1XsZ-7CX-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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_NONE            : 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

This series looks good to me, I agree with Peter that UNKNOWN would be
better than NONE.

I'll add it to my list of things we need to implement on powerpc.

cheers

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v7 1/7] perf/core: Define the common branch type classification Jin Yao <yao.jin@linux.intel.com> - 2017-07-11 09:10 +0200
  Re: [PATCH v7 1/7] perf/core: Define the common branch type  classification Peter Zijlstra <peterz@infradead.org> - 2017-07-11 14:10 +0200
    Re: [PATCH v7 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-11 14:30 +0200
  Re: [PATCH v7 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-12 12:50 +0200

csiph-web