From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87559 invoked by alias); 10 May 2017 11:46:34 -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 87487 invoked by uid 89); 10 May 2017 11:46:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,GIT_PATCH_2,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mga07.intel.com Received: from mga07.intel.com (HELO mga07.intel.com) (134.134.136.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 May 2017 11:46:32 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 10 May 2017 04:46:32 -0700 X-ExtLoop1: 1 Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga004.fm.intel.com with ESMTP; 10 May 2017 04:46:31 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.163]) by IRSMSX102.ger.corp.intel.com ([169.254.2.153]) with mapi id 14.03.0319.002; Wed, 10 May 2017 12:46:31 +0100 From: "Wiederhake, Tim" To: Simon Marchi CC: "gdb-patches@sourceware.org" , "Metzger, Markus T" Subject: RE: [PATCH v3 08/12] btrace: Replace struct btrace_thread_info::up. Date: Wed, 10 May 2017 11:46:00 -0000 Message-ID: <9676A094AF46E14E8265E7A3F4CCE9AF3C14CFD0@irsmsx105.ger.corp.intel.com> References: <1494312929-22749-1-git-send-email-tim.wiederhake@intel.com> <1494312929-22749-9-git-send-email-tim.wiederhake@intel.com> In-Reply-To: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00250.txt.bz2 Hi Simon, Thanks for reviewing! > -----Original Message----- > From: Simon Marchi [mailto:simon.marchi@polymtl.ca] > Sent: Wednesday, May 10, 2017 5:27 AM > To: Wiederhake, Tim > Cc: gdb-patches@sourceware.org; Metzger, Markus T > > Subject: Re: [PATCH v3 08/12] btrace: Replace struct > btrace_thread_info::up. >=20 > On 2017-05-09 02:55, Tim Wiederhake wrote: > > This used to hold a function segment pointer. Change it to hold an > > index into > > the vector of function segments instead. > > > > 2017-05-09 Tim Wiederhake > > > > gdb/ChangeLog: > > > > * btrace.c (ftrace_find_call_by_number): New function. > > (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall, > > ftrace_get_caller, ftrace_find_call, ftrace_new_return, > > ftrace_match_backtrace, ftrace_connect_bfun, > ftrace_connect_backtrace, > > ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as > an > > index. > > * btrace.h (struct btrace_function): Turn UP into an index. > > * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up > > as an index. > > * record-btrace.c (record_btrace_frame_unwind_stop_reason, > > record_btrace_frame_prev_register, record_btrace_frame_sniffer, > > record_btrace_tailcall_frame_sniffe): Same. >=20 > LGTM, just a question below. >=20 > > @@ -1629,11 +1629,12 @@ record_btrace_frame_prev_register (struct > > frame_info *this_frame, > > bfun =3D cache->bfun; > > gdb_assert (bfun !=3D NULL); > > > > - caller =3D bfun->up; > > - if (caller =3D=3D NULL) > > + if (bfun->up =3D=3D 0) > > throw_error (NOT_AVAILABLE_ERROR, > > _("No caller in btrace record history")); > > > > + caller =3D cache->tp->btrace.functions[bfun->up - 1]; > > + >=20 > Would it be good to export ftrace_find_call_by_number so it can be used > at a few places in this file? We should tackle this in a future patch set. > Thanks, >=20 > Simon Regards, Tim 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, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928