Message ID | 1481036629-21542-4-git-send-email-yao.qi@linaro.org |
---|---|
State | New, archived |
Headers |
Received: (qmail 28613 invoked by alias); 6 Dec 2016 15:04:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28510 invoked by uid 89); 6 Dec 2016 15:04:11 -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, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=sk:read_me X-HELO: mail-pg0-f66.google.com Received: from mail-pg0-f66.google.com (HELO mail-pg0-f66.google.com) (74.125.83.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Dec 2016 15:04:06 +0000 Received: by mail-pg0-f66.google.com with SMTP id p66so20117628pga.2 for <gdb-patches@sourceware.org>; Tue, 06 Dec 2016 07:04:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=wLIMC5Uc1yoJQmrGLuO6DnGeVrTXiDvYZhNlTbXvdig=; b=g08Dy01wL55QY5qWhKNzrEc89ZnxxuJqmGKlRJy9qHORXztLpn2r06+x7OkA9i5wMG hYw4seVGOKTtSMXBrlLfzokpiYcZ8q1daNpDMUfTR3QIju9Vsx23HbNYu4FbOksUZLZl bSBzvINlkrd8WW6uSfCe3SwKLsMaanrVg7mGNukU8hdOpUiGCtuC3YeEwjCF9nVmdaSG tPF9a5VCApIxEd+TiUOa9FvGRwLPQuakXruxDToSDk+EqJYUn6dNV9cDK5J9u0Bzwdvl SQkl5XGnkMx4w88B3iUVdXvtoSk+KDLg9CrrYiutH9BKYgK7uHg7P0RVRAGMp7rxKgfX mOqw== X-Gm-Message-State: AKaTC00DoQszm+NJOSivXLraehFeOYDHM6IOOEZG4xfgQVLGW3yMR/in+KoFmPDaoSxzRw== X-Received: by 10.99.209.5 with SMTP id k5mr114017320pgg.145.1481036644747; Tue, 06 Dec 2016 07:04:04 -0800 (PST) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id z28sm35735224pgc.40.2016.12.06.07.04.03 for <gdb-patches@sourceware.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 07:04:04 -0800 (PST) From: Yao Qi <qiyaoltc@gmail.com> X-Google-Original-From: Yao Qi <yao.qi@linaro.org> To: gdb-patches@sourceware.org Subject: [PATCH 3/3] Use code cache in aarch64 prologue analyzer Date: Tue, 6 Dec 2016 15:03:49 +0000 Message-Id: <1481036629-21542-4-git-send-email-yao.qi@linaro.org> In-Reply-To: <1481036629-21542-1-git-send-email-yao.qi@linaro.org> References: <1481036629-21542-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes |
Commit Message
Yao Qi
Dec. 6, 2016, 3:03 p.m. UTC
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 <yao.qi@linaro.org> * 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(-)
Comments
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 <yao.qi@linaro.org> > > * 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.
On 16-12-07 12:26:38, Luis Machado wrote: > > > > > > 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. Yes, I still have some patches for ARM to use cache in arm-tdep.c. I plan to send them out after I measured the performance improvement, but I need to fix PR 20939 before 7.12.1 (released on Jan 2017), so I won't post my ARM patches recently. If you already get your local patches in shape, free feel to post them.
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); } };