From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110513 invoked by alias); 7 Dec 2016 18:26:54 -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 110501 invoked by uid 89); 7 Dec 2016 18:26:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=core_addr, CORE_ADDR, Hx-languages-length:1558, aarch64tdepc X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Dec 2016 18:26:43 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cEgvR-00018m-U9 from Luis_Gustavo@mentor.com ; Wed, 07 Dec 2016 10:26:41 -0800 Received: from [172.30.7.171] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 7 Dec 2016 10:26:39 -0800 Subject: Re: [PATCH 3/3] Use code cache in aarch64 prologue analyzer References: <1481036629-21542-1-git-send-email-yao.qi@linaro.org> <1481036629-21542-4-git-send-email-yao.qi@linaro.org> To: Yao Qi , Reply-To: Luis Machado From: Luis Machado Message-ID: <965901df-04c7-ab45-5e51-34afa9924559@codesourcery.com> Date: Wed, 07 Dec 2016 18:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481036629-21542-4-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00192.txt.bz2 On 12/06/2016 09:03 AM, Yao Qi wrote: > This patch change aarch prologue analyzer using code cache, in order > to improve the performance of remote debugging. > > gdb.perf/skip-prologue.exp (measured by wall-time) is improved when > the program is compiled without debug information. > > Original Patched Original Patched > without dbg without dbg with dbg with dbg > > / 11.1635239124 9.99472999573 9.65339517593 9.66648793221 > -fstack-protector-all 11.2560930252 9.338118 9.63896489143 9.59474396706 > > gdb: > > 2016-12-06 Yao Qi > > * aarch64-tdep.c (instruction_reader::read): Call > read_code_unsigned_integer instead of > read_memory_unsigned_integer. > --- > gdb/aarch64-tdep.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c > index 590dcf6..0175630 100644 > --- a/gdb/aarch64-tdep.c > +++ b/gdb/aarch64-tdep.c > @@ -213,7 +213,7 @@ class instruction_reader : public abstract_instruction_reader > public: > ULONGEST read (CORE_ADDR memaddr, int len, enum bfd_endian byte_order) > { > - return read_memory_unsigned_integer (memaddr, len, byte_order); > + return read_code_unsigned_integer (memaddr, len, byte_order); > } > }; > > The series LGTM except for the nit in 1/3. FTR, we have a similar local patch for ARM and also PowerPC to get the performance numbers up a bit. It helps with remote debugging as well, since we can read from cache instead of fetching it over and over again from the target.