From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jin Yao <yao.jin@linux.intel.com>,
jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v10 1/7] perf/core: Define the common branch type classification
Date: Tue, 18 Jul 2017 12:54:18 -0300 [thread overview]
Message-ID: <20170718155418.GA20962@kernel.org> (raw)
In-Reply-To: <871spejdl2.fsf@concordia.ellerman.id.au>
Em Tue, Jul 18, 2017 at 07:31:37PM +1000, Michael Ellerman escreveu:
> 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)
Ok, collecting acks from you, Jiri and PeterZ, will try to get this
upstreamed soon.
- Arnaldo
next prev parent reply other threads:[~2017-07-18 15:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 12:13 [PATCH v10 0/7] perf report: Show branch type Jin Yao
2017-07-18 12:13 ` [PATCH v10 1/7] perf/core: Define the common branch type classification Jin Yao
2017-07-18 9:31 ` Michael Ellerman
2017-07-18 15:54 ` Arnaldo Carvalho de Melo [this message]
2017-07-20 9:03 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 2/7] perf/x86/intel: Record branch type Jin Yao
2017-07-20 9:04 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 3/7] perf record: Create a new option save_type in --branch-filter Jin Yao
2017-07-20 9:04 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 4/7] perf report: Refactor the branch info printing code Jin Yao
2017-07-20 9:04 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 5/7] perf util: Create branch.c/.h for common branch functions Jin Yao
2017-07-20 9:05 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 6/7] perf report: Show branch type statistics for stdio mode Jin Yao
2017-07-20 9:05 ` [tip:perf/core] " tip-bot for Jin Yao
2017-07-18 12:13 ` [PATCH v10 7/7] perf report: Show branch type in callchain entry Jin Yao
2017-07-20 9:05 ` [tip:perf/core] " tip-bot for Jin Yao
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=20170718155418.GA20962@kernel.org \
--to=acme@kernel.org \
--cc=Linux-kernel@vger.kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).