From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105432 invoked by alias); 8 Sep 2015 12:21:04 -0000 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 Received: (qmail 105422 invoked by uid 89); 8 Sep 2015 12:21:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga03.intel.com Received: from mga03.intel.com (HELO mga03.intel.com) (134.134.136.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Sep 2015 12:21:01 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 08 Sep 2015 05:20:59 -0700 X-ExtLoop1: 1 Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga001.jf.intel.com with ESMTP; 08 Sep 2015 05:21:00 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.201]) by IRSMSX103.ger.corp.intel.com ([169.254.3.251]) with mapi id 14.03.0224.002; Tue, 8 Sep 2015 13:19:37 +0100 From: "Metzger, Markus T" To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] btrace: kernel address filtering Date: Tue, 08 Sep 2015 12:21:00 -0000 Message-ID: References: <1441122141-26033-1-git-send-email-markus.t.metzger@intel.com> <55EEB763.2060701@redhat.com> In-Reply-To: <55EEB763.2060701@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00089.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Tuesday, September 8, 2015 12:25 PM > To: Metzger, Markus T > Cc: gdb-patches@sourceware.org > Subject: Re: [PATCH] btrace: kernel address filtering >=20 > On 09/01/2015 04:42 PM, Markus Metzger wrote: >=20 > > --- a/gdb/nat/linux-btrace.h > > +++ b/gdb/nat/linux-btrace.h > > @@ -101,10 +101,11 @@ struct btrace_target_info > > } variant; > > #endif /* HAVE_LINUX_PERF_EVENT_H */ > > > > - /* The size of a pointer in bits for this thread. > > - The information is used to identify kernel addresses in order to = skip > > - records from/to kernel space. */ > > - int ptr_bits; > > + /* The kernel start address. > > + The information is used to tell kernel addresses from user addres= ses in > > + order to skip records from kernel space. We assume that any addr= ess > > + smaller than KERNEL_START is in user space. */ > > + uint64_t kernel_start; >=20 > Is there a reason we need to store the kernel's start address on every > thread? I don't think we need to store it, at all. We had to store the ptr_bits si= nce we needed to fill them in later. But the kernel start address is computed, ca= ched, and used in nat/linux-btrace.c. I'll send an updated patch. thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul Chairperson of the Supervisory Board: Tiffany Doon Silva Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928