From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1283 invoked by alias); 17 Dec 2012 17:11:39 -0000 Received: (qmail 1247 invoked by uid 22791); 17 Dec 2012 17:11:37 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Dec 2012 17:11:28 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id qBHHBCHn009268; Mon, 17 Dec 2012 18:11:12 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id qBHHBADJ018585; Mon, 17 Dec 2012 18:11:10 +0100 (CET) Date: Mon, 17 Dec 2012 17:11:00 -0000 Message-Id: <201212171711.qBHHBADJ018585@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: markus.t.metzger@intel.com CC: jan.kratochvil@redhat.com, palves@redhat.com, tromey@redhat.com, gdb-patches@sourceware.org, markus.t.metzger@gmail.com, markus.t.metzger@intel.com In-reply-to: <1355760101-26237-13-git-send-email-markus.t.metzger@intel.com> Subject: Re: [patch v6 12/12] btrace, x86: disable on some processors References: <1355760101-26237-1-git-send-email-markus.t.metzger@intel.com> <1355760101-26237-13-git-send-email-markus.t.metzger@intel.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00576.txt.bz2 > From: > Date: Mon, 17 Dec 2012 17:01:41 +0100 > > From: Markus Metzger > > 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 > > * 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.