From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8461 invoked by alias); 10 May 2017 03:46:15 -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 7794 invoked by uid 89); 10 May 2017 03:45:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 May 2017 03:45:24 +0000 Received: by simark.ca (Postfix, from userid 33) id 639A31E4A4; Tue, 9 May 2017 23:45:17 -0400 (EDT) To: Tim Wiederhake Subject: Re: [PATCH v3 09/12] btrace: Remove struct btrace_thread_info::flow. X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 May 2017 03:46:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org, markus.t.metzger@intel.com In-Reply-To: <1494312929-22749-10-git-send-email-tim.wiederhake@intel.com> References: <1494312929-22749-1-git-send-email-tim.wiederhake@intel.com> <1494312929-22749-10-git-send-email-tim.wiederhake@intel.com> Message-ID: <1b056a5b6923e4357b0795d513b1d8cc@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00239.txt.bz2 The title should mention btrace_function::flow instead of btrace_thread_info::flow. I just realized the previous patch has the same issue. On 2017-05-09 02:55, Tim Wiederhake wrote: > This used to hold a pair of pointers to the previous and next function > segment > in execution flow order. It is no longer necessary as the previous and > next > function segments now are simply the previous and next elements in the > vector > of function segments. > > 2017-05-09 Tim Wiederhake > > gdb/ChangeLog: > > * btrace.c (ftrace_new_function, ftrace_fixup_level, > ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps, > btrace_insn_next, btrace_insn_prev): Remove references to > btrace_thread_info::flow. btrace_function::flow. > * btrace.h (struct btrace_function): Remove FLOW. > The patch LGTM, but I have one question. Did you consider adding a backlink in btrace_function to its btrace_thread_info owner? It would possible to implement gap->next () and gap->prev (), which could be used in many places, and would probably be more readable than ftrace_find_call_by_number (btinfo, gap->number - 1) ftrace_find_call_by_number (btinfo, gap->number + 1) And it could possibly bring more simplifications, I didn't look in details. Thanks, Simon