Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1684748
| From | Michael Ellerman <mpe@ellerman.id.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 1/7] perf/core: Define the common branch type classification |
| Date | 2017-07-11 04:30 +0200 |
| Message-ID | <u1T61-4Qu-1@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <u1EgF-3Sw-1@gated-at.bofh.it> <u1Fmq-4u7-5@gated-at.bofh.it> <u1GLw-5vA-11@gated-at.bofh.it> <u1Hey-5Fo-15@gated-at.bofh.it> <u1HxU-61m-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
"Jin, Yao" <yao.jin@linux.intel.com> writes: > On 7/10/2017 9:46 PM, Peter Zijlstra wrote: >> On Mon, Jul 10, 2017 at 08:10:50AM -0500, Segher Boessenkool wrote: >> >>>> 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? >> The "INT" thing has indeed been used as system call mechanism (typically >> INT 80). But these days we have special purpose syscall instructions. >> >> It could maybe be compared to the PPC "Unconditional TRAP with >> immediate" where you use the immediate value as an index into a handler >> vector. >> >>> 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 is actual interrupts, but also faults, traps and all the other >> exceptions not caused by "INT" I think. >> > Yes. It's interrupt, traps, faults. If from is in the user space and to > is in the kernel, it indicates the ring3 -> ring0 transition. > > If the from instruction is not syscall or other ring transition > instruction, it should be interrupt, traps and faults. That's how we get > the PERF_BR_IRQ on x86. > > Anyway, maybe we just use a minimum but the most common set of branch > types now, it could be a good start and acceptable on all architectures. > > 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 */ That would be fine by me, if you're sick of talking about it and just want to get it merged :) I think you could expand it a bit, this list would cover the vast bulk of branch types for us: 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 */ cheers
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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