From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17108 invoked by alias); 6 Dec 2012 20:56:44 -0000 Received: (qmail 17046 invoked by uid 22791); 6 Dec 2012 20:56:43 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Dec 2012 20:56:40 +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 qB6KudMA015274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Dec 2012 15:56:39 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qB6Kubbn024667; Thu, 6 Dec 2012 15:56:38 -0500 Message-ID: <50C10685.50108@redhat.com> Date: Thu, 06 Dec 2012 20:56:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 2/6] Iterate over ALL_TRACEPOINTS first. References: <1354596282-32526-1-git-send-email-yao@codesourcery.com> <1354596282-32526-3-git-send-email-yao@codesourcery.com> In-Reply-To: <1354596282-32526-3-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00116.txt.bz2 On 12/04/2012 04:44 AM, Yao Qi wrote: > Hi, > The 'breakpoint-modified' observer is notified on the breakpoint > level, in order to notify observer for a given tracepoint only once, > we change to iterate over tracepoint first, and then iterate over > locations of each tracepoint. In the inner loop, when we find a > tracepoint location is downloaded, we mark a flag, and notify the > observer in outer loop (on tracepoints) if flag is true. In short, we > change the iteration from: > > ALL_BP_LOCATIONS (bl, blp_tmp) > { > if (!is_tracepoint (bl->owner)) > continue; > } > > to: > > ALL_TRACEPOINTS (b) > { > for (bl = b->loc; bl; bl = bl->next) > {} > } > > download_tracepoint_locations is called after breakpoint re-setting, > so I think this change has no functional affect. Yes, I think so too, because tracepoint locations are never duplicates (otherwise this would be a problem). OK. -- Pedro Alves