From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17596 invoked by alias); 9 Dec 2016 09:56:03 -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 17525 invoked by uid 89); 9 Dec 2016 09:56:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=COMPILE, =e5=b0=a7, H*f:sk:1481036, 161207?= X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Dec 2016 09:55:51 +0000 Received: by mail-wm0-f68.google.com with SMTP id u144so2894096wmu.0 for ; Fri, 09 Dec 2016 01:55:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=3xsT6ypSrW/yQNrTcaKz9IOCxzB1iHJg9cHY/qh/rnE=; b=VHWG+0jgQIQ0guGzs1qOqAqlqLvuLkQkKgUIRpqFAjEpxCD/tsgRji8FjUnl/xNKdu qLR+VlPdPeSx7K937/tDhdvyze3z58MRbapuXRbKJNW3KyN1YjyATH5hGtvAFsl5RTA/ FDU0mawJNJeBK2ayA1pkUVwCbckupvJYqyxzQA47JUnTM71CbEyzqieE6d/2XL98rvVU Eeco/lSiZ3HH599cWim4JeEdkP8vR2B5nOgry6Xzx6s6u5JhMAQKh7NK0L4E5LWShird zlQ7c/iYrvWMBvwUVqDl1kLmJ4j23BZMsn5WtEobHbAiHHc3HHb+VMQsh1QHz+banbJ7 qeuA== X-Gm-Message-State: AKaTC02dtfkLVeSFfJNqsEBum7ZXu+2rfg2XrDatHqo34SBMtJ/yCNK72DI6pGtQ7EVjmw== X-Received: by 10.28.209.67 with SMTP id i64mr6346664wmg.48.1481277349856; Fri, 09 Dec 2016 01:55:49 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id c81sm19623831wmf.22.2016.12.09.01.55.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 09 Dec 2016 01:55:49 -0800 (PST) Date: Fri, 09 Dec 2016 09:56:00 -0000 From: Yao Qi To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] Compile gdb.perf/skip-prologue.c with and without debug info Message-ID: <20161209095533.GD13661@E107787-LIN> References: <1481036629-21542-1-git-send-email-yao.qi@linaro.org> <1481036629-21542-2-git-send-email-yao.qi@linaro.org> <53b4ccc4-d0ad-643f-4700-a5ec130eea1f@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53b4ccc4-d0ad-643f-4700-a5ec130eea1f@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00225.txt.bz2 On 16-12-07 12:24:25, Luis Machado wrote: > >+ > >+ if { [gdb_compile "$srcdir/$subdir/$srcfile" ${binfile} executable $opts] != "" } { > > > Maybe add an untested call here saying "failed to compile"? Just a nit. Sure, fixed in the patch below. -- Yao (齐尧) >From 364ca42e71dfdce3f34e97ef028f7e3d5b5d880e Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 9 Dec 2016 09:51:20 +0000 Subject: [PATCH] Compile gdb.perf/skip-prologue.c with and without debug info 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-09 Yao Qi * gdb.perf/skip-prologue.exp: Add parameter COMPILE. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e63f2b7..d905df3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-12-09 Yao Qi + + * gdb.perf/skip-prologue.exp: Add parameter COMPILE. + 2016-12-02 Luis Machado * gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when diff --git a/gdb/testsuite/gdb.perf/skip-prologue.exp b/gdb/testsuite/gdb.perf/skip-prologue.exp index 2c4aad4..f31f697 100644 --- a/gdb/testsuite/gdb.perf/skip-prologue.exp +++ b/gdb/testsuite/gdb.perf/skip-prologue.exp @@ -37,7 +37,14 @@ 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] != "" } { + untested "failed to compile" return -1 }