From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94327 invoked by alias); 30 Jun 2015 17:26:44 -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 94318 invoked by uid 89); 30 Jun 2015 17:26:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 30 Jun 2015 17:26:43 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 2B71119CB94; Tue, 30 Jun 2015 17:26:42 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5UHQepo025318; Tue, 30 Jun 2015 13:26:41 -0400 Message-ID: <5592D150.6080201@redhat.com> Date: Tue, 30 Jun 2015 17:26:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Patrick Palka , gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] Be lazy about refreshing the windows in tui_show_frame_info (PR tui/13378) References: <5592B187.20507@redhat.com> <1435683072-7810-1-git-send-email-patrick@parcs.ath.cx> In-Reply-To: <1435683072-7810-1-git-send-email-patrick@parcs.ath.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-06/txt/msg00657.txt.bz2 On 06/30/2015 05:51 PM, Patrick Palka wrote: > [ This version just changes tui_set_locator_info as you suggested. ] > > tui_show_frame_info is responsible for updating the visible windows > following a change in frame information (that being the currently > selected frame, PC, line number, etc). Currently it always redraws and > refreshes each window even if frame information has not changed. This > behavior is inefficient and helps contribute to the occassional > flickering of the TUI as described in the mentioned PR. > > This patch makes tui_show_frame_info refresh the windows only if frame > information has changed. Determining whether frame information has > changed is done indirectly by determining whether the locator has > changed. This approach is convenient and yet sensible because the > locator contains all the relevant info we need to check anyway: the > current PC, the line number, the name of the executable and the name of > the current function. Probably only the PC is really necessary to > check, but it doesn't hurt to check every field. > > Effectively, with this patch, consecutive calls to select_frame with the > same frame/PC no longer cause TUI's frame information to be updated > multiple times. > > gdb/ChangeLog: > > * tui/tui-stack.c (tui_set_locator_info): Change prototype to > return an int instead of void. Return whether the locator > window has changed. > (tui_show_frame_info): If the locator info has not changed, then > bail out early to avoid refreshing the windows. OK. Thanks, Pedro Alves