Re: [PATCH] perf/x86/intel/lbr: fix branch type encoding

From: Andi Kleen
Date: Thu Aug 11 2022 - 16:21:56 EST



On 8/11/2022 5:33 PM, Stephane Eranian wrote:

In fact, I don't see a case where you would not benefit from the branch type.
Furthermore, not having the branch type DOES NOT save any space in the
branch record (given we have a reserved field). So I think I prefer not having
to specify yet another cmdline option to get the branch type. In fact, if you do
not pass the option, then perf report -D reports some bogus branch types, i.e.,
not all entries have empty types.

Perhaps Peter remember the details, but there was some ABI compatibility issue that motivated the extra save type bitmap.

Also there's another reason that if you don't need them and the hardware doesn't support it they add run time overhead because the branches need to be decoded in the PMI.

But I agree it would be useful to make them part of -b default, as long as there is some way to turn it off again when not needed. The extra option is kind of a pain.

-Andi