From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23852 invoked by alias); 19 Dec 2012 16:13:13 -0000 Received: (qmail 23831 invoked by uid 22791); 19 Dec 2012 16:13:10 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Dec 2012 16:12:59 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 19 Dec 2012 08:12:57 -0800 X-ExtLoop1: 1 Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga002.fm.intel.com with ESMTP; 19 Dec 2012 08:12:36 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.95]) by IRSMSX101.ger.corp.intel.com ([169.254.1.13]) with mapi id 14.01.0355.002; Wed, 19 Dec 2012 16:11:39 +0000 From: "Metzger, Markus T" To: Mark Kettenis CC: "jan.kratochvil@redhat.com" , "palves@redhat.com" , "tromey@redhat.com" , "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" Subject: RE: [patch v6 12/12] btrace, x86: disable on some processors Date: Wed, 19 Dec 2012 16:13:00 -0000 Message-ID: References: <1355760101-26237-1-git-send-email-markus.t.metzger@intel.com> <1355760101-26237-13-git-send-email-markus.t.metzger@intel.com> <201212171711.qBHHBADJ018585@glazunov.sibelius.xs4all.nl> In-Reply-To: <201212171711.qBHHBADJ018585@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00707.txt.bz2 > -----Original Message----- > From: Mark Kettenis [mailto:mark.kettenis@xs4all.nl] > Sent: Monday, December 17, 2012 6:11 PM Thanks for your review. > > LBR, BTM, or BTS records may have incorrect branch "from" information a= fer 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. >=20 > 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. This function is only called if the kernel provides a perf_event.h header f= ile, which requires a recent enough kernel. Will a recent kernel run on tho= se old cpu's that don't implement cpuid? In order to check whether the kernel supports BTS, I would need to enable t= racing. Let's see if I can use the gdb or gdbserver process for this, since= I don't necessarily have an inferior. If you think that it is necessary, I= could try to add such a check. I added a vendor check. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052