From: "Jin, Yao" <yao.jin@linux•intel.com>
To: Peter Zijlstra <peterz@infradead•org>,
Segher Boessenkool <segher@kernel•crashing.org>
Cc: Michael Ellerman <mpe@ellerman•id.au>,
acme@kernel•org, jolsa@kernel•org, mingo@redhat•com,
alexander.shishkin@linux•intel.com, kan.liang@intel•com,
ak@linux•intel.com, linuxppc-dev@lists•ozlabs.org,
Linux-kernel@vger•kernel.org, yao.jin@intel•com
Subject: Re: [PATCH v6 1/7] perf/core: Define the common branch type classification
Date: Mon, 10 Jul 2017 22:06:21 +0800 [thread overview]
Message-ID: <b8ff5062-6477-01a2-b626-1ea3c286d272@linux.intel.com> (raw)
In-Reply-To: <20170710134658.k44bpa7tra2woyiu@hirez.programming.kicks-ass.net>
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 */
Thanks
Jin Yao
next prev parent reply other threads:[~2017-07-10 14:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 12:07 [PATCH v6 0/7] perf report: Show branch type Jin Yao
2017-04-20 9:36 ` Jiri Olsa
2017-04-23 8:36 ` Jin, Yao
2017-06-02 8:02 ` Jin, Yao
2017-06-26 6:24 ` Jin, Yao
2017-07-06 1:47 ` Jin, Yao
2017-04-20 12:07 ` [PATCH v6 1/7] perf/core: Define the common branch type classification Jin Yao
2017-07-07 8:42 ` Peter Zijlstra
2017-07-10 5:19 ` Michael Ellerman
2017-07-10 6:05 ` Michael Ellerman
2017-07-10 8:16 ` Jin, Yao
2017-07-10 10:32 ` Michael Ellerman
2017-07-10 11:46 ` Jin, Yao
2017-07-10 13:10 ` Segher Boessenkool
2017-07-10 13:28 ` Jin, Yao
2017-07-10 13:46 ` Peter Zijlstra
2017-07-10 14:06 ` Jin, Yao [this message]
2017-07-11 2:28 ` Michael Ellerman
2017-07-11 3:00 ` Jin, Yao
2017-07-10 14:37 ` Segher Boessenkool
2017-07-11 2:13 ` Michael Ellerman
2017-04-20 12:07 ` [PATCH v6 2/7] perf/x86/intel: Record branch type Jin Yao
2017-04-23 13:55 ` Jiri Olsa
2017-04-24 0:47 ` Jin, Yao
2017-05-08 0:49 ` Jin, Yao
2017-05-09 8:26 ` Jiri Olsa
2017-05-09 11:57 ` Jin, Yao
2017-05-09 12:39 ` Jiri Olsa
2017-05-10 0:18 ` Jin, Yao
2017-04-20 12:07 ` [PATCH v6 3/7] perf record: Create a new option save_type in --branch-filter Jin Yao
2017-04-20 12:07 ` [PATCH v6 4/7] perf report: Refactor the branch info printing code Jin Yao
2017-04-20 12:07 ` [PATCH v6 5/7] perf util: Create branch.c/.h for common branch functions Jin Yao
2017-04-20 12:07 ` [PATCH v6 6/7] perf report: Show branch type statistics for stdio mode Jin Yao
2017-04-20 12:07 ` [PATCH v6 7/7] perf report: Show branch type in callchain entry Jin Yao
2017-07-07 8:09 ` [PATCH v6 0/7] perf report: Show branch type Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8ff5062-6477-01a2-b626-1ea3c286d272@linux.intel.com \
--to=yao.jin@linux$(echo .)intel.com \
--cc=Linux-kernel@vger$(echo .)kernel.org \
--cc=acme@kernel$(echo .)org \
--cc=ak@linux$(echo .)intel.com \
--cc=alexander.shishkin@linux$(echo .)intel.com \
--cc=jolsa@kernel$(echo .)org \
--cc=kan.liang@intel$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@redhat$(echo .)com \
--cc=mpe@ellerman$(echo .)id.au \
--cc=peterz@infradead$(echo .)org \
--cc=segher@kernel$(echo .)crashing.org \
--cc=yao.jin@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox