This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch v6 12/12] btrace, x86: disable on some processors


> From: <markus.t.metzger@intel.com>
> Date: Mon, 17 Dec 2012 17:01:41 +0100
> 
> From: Markus Metzger <markus.t.metzger@intel.com>
> 
> LBR, BTM, or BTS records may have incorrect branch "from" information afer an
> EIST transition, T-states, C1E, or Adaptive Thermal Throttling (AAJ122).
> 
> This results in sporadic test fails. Disable btrace on those processors.
> 
> 2012-12-17 Markus Metzger <markus.t.metzger@intel.com>
> 
> 	* common/linux-btrace.c (linux_supports_btrace): Add cpuid check.

I think this approach is a reasonable compromise.  However, AFAICT the
linux_supports_btrace() is called unconditionally.  Therefore this
will break GDB on old CPUs that don't implement the cpuid
instructions.  And AFAIK the family/model values are specific to
Intel, so you should check that you're on an Intel CPU before
interpreting these values.  And I still think you should check whether
the kernel supports BTS on the CPU you're running on first before
disabling it on certain CPUs.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]