From patchwork Tue Dec 6 15:03:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 18234 Received: (qmail 28533 invoked by alias); 6 Dec 2016 15:04:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28412 invoked by uid 89); 6 Dec 2016 15:04:10 -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=COMPILE, exercised, Hx-languages-length:1336 X-HELO: mail-pg0-f68.google.com Received: from mail-pg0-f68.google.com (HELO mail-pg0-f68.google.com) (74.125.83.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Dec 2016 15:04:04 +0000 Received: by mail-pg0-f68.google.com with SMTP id p66so20117510pga.2 for ; Tue, 06 Dec 2016 07:04:04 -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=Zp9PYpDQED0UWMWHNgwUxJHoKNLAb8Lj+3PnBOTq0eE=; b=Wjdou/HFaQyum2n0I1K5dDn/r6XtFvPw0lbUpFDuw6bxdSZMe2WDWgYzVq+itrc/9r LHDHsHep4wR9KL9+Kd08NzjHiv6Amyh1Npy/s4FW1Lch4k6/qBE07LEjUAC+XX8nHtfq JGaZpILAeAK9xAgo8BqbJMZ7BsFTU8Gnc80Yxbs/qvC5xOUINffeN18W91Hw1xuH8zdO 4NkjW9eH0JBAn7RwQqpD8DLgLnNgP3KlZh3UZOvNXZk2APeJMyw42i5NbcKlKrnn1EKj jrhiqhjOlVUptmM7zTgwmWhrzVepAefLnHSzMWErOWoiEpMsU8gSUXFdK06Hc6K6ziux Ijcw== X-Gm-Message-State: AKaTC02iFztH5tyGe6kTdcmVRS91P0z+siYXrc6DDYfIt7EBTUixWN7oTvVbuWAjnfFXOQ== X-Received: by 10.99.144.65 with SMTP id a62mr112983046pge.103.1481036642353; Tue, 06 Dec 2016 07:04:02 -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.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Dec 2016 07:04:01 -0800 (PST) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH 1/3] Compile gdb.perf/skip-prologue.c with and without debug info Date: Tue, 6 Dec 2016 15:03:47 +0000 Message-Id: <1481036629-21542-2-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 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] != "" } { return -1 }