From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101914 invoked by alias); 7 Dec 2016 18:24:48 -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 101826 invoked by uid 89); 7 Dec 2016 18:24:47 -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=3713 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:24:37 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1cEgtN-0000Yc-UZ from Luis_Gustavo@mentor.com ; Wed, 07 Dec 2016 10:24:33 -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:24:31 -0800 Subject: Re: [PATCH 1/3] Compile gdb.perf/skip-prologue.c with and without debug info References: <1481036629-21542-1-git-send-email-yao.qi@linaro.org> <1481036629-21542-2-git-send-email-yao.qi@linaro.org> To: Yao Qi , Reply-To: Luis Machado From: Luis Machado Message-ID: <53b4ccc4-d0ad-643f-4700-a5ec130eea1f@codesourcery.com> Date: Wed, 07 Dec 2016 18:24: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-2-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-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00191.txt.bz2 On 12/06/2016 09:03 AM, Yao Qi wrote: > gdb.perf/skip-prologue.exp is intended to measure the performance of > skipping prologue with prologue analysis by setting breakpoints. > However, if program is compiled with debug info, GDB is smart to > skip prologue by line table from debug info, so prologue analysis > is not exercised at all. > > This patch adds a parameter COMPILE to specify compiling with > debug information, otherwise, it is compiled without debug > information. > > gdb/testsuite: > > 2016-12-06 Yao Qi > > * gdb.perf/skip-prologue.exp: Add parameter COMPILE. > --- > gdb/testsuite/gdb.perf/skip-prologue.exp | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp > index 2c4aad4..a24fd73 100644 > --- a/gdb/testsuite/gdb.perf/skip-prologue.exp > +++ b/gdb/testsuite/gdb.perf/skip-prologue.exp > @@ -37,7 +37,13 @@ if ![info exists SKIP_PROLOGUE_COUNT] { > PerfTest::assemble { > global srcdir subdir srcfile binfile > > - if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable {debug}] != "" } { > + if [info exists COMPILE] { > + set opts {debug} > + } else { > + set opts {nodebug} > + } > + > + if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } { Maybe add an untested call here saying "failed to compile"? Just a nit.