Re: perf, x86: only do lbr init if bts is available

Andi Kleen
2012-05-25T22:49:07Z

Stephane Eranian <eranian@google.com> writes:

> On Thu, May 24, 2012 at 6:41 PM, David Ahern <dsahern@gmail.com> wrote:
>> On 5/24/12 10:35 AM, Stephane Eranian wrote:
>>>
>>> Well, no. There is no connection between BTS and LBR and you're creating
>>> one.
>>
>>
>> Ok. That was not clear to me from skimming the manual.
>> Then should it be tied to X86_FEATURE_DTES64?
>>
> No, it is unrelated to the Debug Store.
> There is really nothing you can use to figure that out, not event IA32_DEBUGCTL.

One way to do it would be to reread DEBUGCTL after writing and see if
the bit really changed to 1. If not assume LBR is not available.

-Andi

--
ak@linux.intel.com -- Speaking for myself only