From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14425 invoked by alias); 6 Oct 2013 19:46:43 -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 14415 invoked by uid 89); 6 Oct 2013 19:46:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Oct 2013 19:46:42 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r96JkesP011804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Oct 2013 15:46:40 -0400 Received: from host2.jankratochvil.net (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r96JkaQx031077 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 6 Oct 2013 15:46:38 -0400 Date: Sun, 06 Oct 2013 19:46:00 -0000 From: Jan Kratochvil To: Markus Metzger Cc: gdb-patches@sourceware.org, Christian Himpel Subject: Re: [patch v6 03/21] btrace: change branch trace data structure Message-ID: <20131006194636.GA28020@host2.jankratochvil.net> References: <1379676639-31802-1-git-send-email-markus.t.metzger@intel.com> <1379676639-31802-4-git-send-email-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379676639-31802-4-git-send-email-markus.t.metzger@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00165.txt.bz2 On Fri, 20 Sep 2013 13:30:21 +0200, Markus Metzger wrote: > --- a/gdb/btrace.h > +++ b/gdb/btrace.h [...] > @@ -103,16 +168,25 @@ struct btrace_thread_info > the underlying architecture. */ > struct btrace_target_info *target; > > - /* The current branch trace for this thread. */ > - VEC (btrace_block_s) *btrace; > - VEC (btrace_inst_s) *itrace; > - VEC (btrace_func_s) *ftrace; > + /* The current branch trace for this thread (both inclusive). > + > + The last instruction of END is the current instruction, which is not > + part of the execution history. > + Both will be NULL if there is not branch trace available. If there is I do not think the wording is right. Either: Both will be NULL if branch trace is not available. or Both will be NULL if there is no branch trace available. > + branch trace available, both will be non-NULL. */ > + struct btrace_function *begin; > + struct btrace_function *end; > + > + /* The function level offset. When added to each function's LEVEL, > + this normalizes the function levels such that the smallest level > + becomes zero. */ > + int level; > [...] > +/* Initialize a branch trace call iterator to point to the begin/end of > + the branch trace. Throws an error if there is no branch trace. */ > +extern void btrace_call_begin (struct btrace_call_iterator *, > + const struct btrace_thread_info *); > +extern void btrace_call_end (struct btrace_call_iterator *, > + const struct btrace_thread_info *); > + > +/* Increment/decrement a branch trace call iterator by at most STRIDE function > + segments. Return the number of function segments s by which the call Typo, excessive " s ". > + iterator has been advanced. > + Returns zero, if the operation failed or STRIDE had been zero. */ > +extern unsigned int btrace_call_next (struct btrace_call_iterator *, > + unsigned int stride); > +extern unsigned int btrace_call_prev (struct btrace_call_iterator *, > + unsigned int stride); Thanks, Jan