linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: "Liang, Kan" <kan.liang@linux.intel.com>,
	Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	kan.liang@intel.com, acme@redhat.com, namhyung@kernel.org,
	irogers@google.com
Subject: Re: [PATCH] perf/x86/intel/lbr: fix branch type encoding
Date: Fri, 12 Aug 2022 10:16:50 +0200	[thread overview]
Message-ID: <fa9f74d3-3a5e-9b8c-3142-9377677a6b74@linux.intel.com> (raw)
In-Reply-To: <2fc8dc1d-6922-e2e0-8b5d-fad25ab12cbd@linux.intel.com>


>
> I think the option is to avoid the overhead of disassembling of branch
> instruction. See eb0baf8a0d92 ("perf/core: Define the common branch type
> classification")
> "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."


Thanks for digging it out. So it was only performance.

>
> I have no idea how big the overhead is. If we can always be benefit from
> the branch type. I guess we can make it default on.

I thought even arch LBR had one case where it had to disassemble, but 
perhaps it's unlikely enough because it's pre filtered. If yes it may be 
ok to enable it there unconditionally at the kernel level.

Still have to decide if we want older parts to have more overhead by 
default. I guess would need some data on that.


-Andi


  reply	other threads:[~2022-08-12  8:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 21:06 [PATCH] perf/x86/intel/lbr: fix branch type encoding Stephane Eranian
2022-08-11 12:23 ` Liang, Kan
2022-08-11 14:17   ` Stephane Eranian
2022-08-11 14:41     ` Liang, Kan
2022-08-11 15:28       ` Stephane Eranian
2022-08-11 15:33         ` Stephane Eranian
2022-08-11 15:56           ` Liang, Kan
2022-08-12  8:16             ` Andi Kleen [this message]
2022-08-14 19:37               ` Liang, Kan
2022-08-15 19:45                 ` Stephane Eranian
2022-08-15 20:39                   ` Liang, Kan
2022-08-12 19:35             ` Arnaldo Carvalho de Melo
2022-08-14 19:39               ` Liang, Kan
2022-08-11 20:21           ` Andi Kleen

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=fa9f74d3-3a5e-9b8c-3142-9377677a6b74@linux.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=kan.liang@intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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).