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


Groups > linux.kernel > #1684224

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

From Segher Boessenkool <segher@kernel.crashing.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/7] perf/core: Define the common branch type classification
Date 2017-07-10 15:20 +0200
Message-ID <u1GLw-5vA-11@gated-at.bofh.it> (permalink)
References (1 earlier) <tybJv-4aP-17@gated-at.bofh.it> <u1A3o-1hK-5@gated-at.bofh.it> <u1C5c-2xU-15@gated-at.bofh.it> <u1EgF-3Sw-1@gated-at.bofh.it> <u1Fmq-4u7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi!

On Mon, Jul 10, 2017 at 07:46:17PM +0800, Jin, Yao wrote:
> 1. We all agree these definitions:
> 
> +	PERF_BR_COND		= 1,	/* conditional */
> +	PERF_BR_UNCOND		= 2,	/* unconditional */
> +	PERF_BR_IND		= 3,	/* indirect */
> +	PERF_BR_CALL		= 4,	/* call */
> +	PERF_BR_IND_CALL	= 5,	/* indirect call */
> +	PERF_BR_RET		= 6,	/* return */
> +	PERF_BR_SYSCALL		= 7,	/* syscall */
> +	PERF_BR_SYSRET		= 8,	/* syscall return */
> +	PERF_BR_IRET		= 11,	/* return from interrupt */

Do we?  It does not map very well to PowerPC branch types.

> 2. I wish to keep following definitions for x86.
> 
> +	PERF_BR_IRQ		= 9,	/* hw interrupt/trap/fault */
> +	PERF_BR_INT		= 10,	/* sw interrupt */
> 
> PERF_BR_INT is triggered by instruction "int" .
> PERF_BR_IRQ is triggered by interrupts, traps, faults (the ring 0,3 
> transition).

So your "PERF_BR_INT" is a system call?  And PERF_BR_IRQ is not an
interrupt request (as its name suggests), not what we call an "external
interrupt" either; instead it is every interrupt that is not a system
call?

It also does not follow the lines of "software caused interrupt" vs.
the rest.

> 4. I'd like to add following types for powerpc.
> 
> 	PERF_BR_COND_CALL	/* Conditional call */
> 	PERF_BR_COND_RET	/* Condition return */

Almost all PowerPC branches have a "conditional" version (only "syscall"
and "sysret/iret" do not -- and those last two are the same, just like
PERF_BR_INT seems to be the same as PERF_BR_SYSCALL).

So how should those PERF_BR_* be used?  It cannot be used in an
architecture-neutral interface the way you define it now.


Segher

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


Thread

Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-10 08:10 +0200
  Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-10 10:20 +0200
    Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-10 12:40 +0200
      Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-10 13:50 +0200
        Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Segher Boessenkool <segher@kernel.crashing.org> - 2017-07-10 15:20 +0200
          Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-10 15:30 +0200
          Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification Peter Zijlstra <peterz@infradead.org> - 2017-07-10 15:50 +0200
            Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-10 16:10 +0200
              Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-11 04:30 +0200
                Re: [PATCH v6 1/7] perf/core: Define the common branch type  classification "Jin, Yao" <yao.jin@linux.intel.com> - 2017-07-11 05:10 +0200
            Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Segher Boessenkool <segher@kernel.crashing.org> - 2017-07-10 16:40 +0200
          Re: [PATCH v6 1/7] perf/core: Define the common branch type classification Michael Ellerman <mpe@ellerman.id.au> - 2017-07-11 04:20 +0200

csiph-web