Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Yao Qi <qiyaoltc@gmail.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/3] Compile gdb.perf/skip-prologue.c with and without debug info
Date: Wed, 07 Dec 2016 18:24:00 -0000	[thread overview]
Message-ID: <53b4ccc4-d0ad-643f-4700-a5ec130eea1f@codesourcery.com> (raw)
In-Reply-To: <1481036629-21542-2-git-send-email-yao.qi@linaro.org>

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  <yao.qi@linaro.org>
>
> 	* 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.


  reply	other threads:[~2016-12-07 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 15:04 [PATCH 0/3] Use code cache in arm and aarch64 prologue analyzer Yao Qi
2016-12-06 15:04 ` [PATCH 2/3] Use code cache in arm " Yao Qi
2016-12-06 15:04 ` [PATCH 3/3] Use code cache in aarch64 " Yao Qi
2016-12-07 18:26   ` Luis Machado
2016-12-09  9:40     ` Yao Qi
2016-12-06 15:04 ` [PATCH 1/3] Compile gdb.perf/skip-prologue.c with and without debug info Yao Qi
2016-12-07 18:24   ` Luis Machado [this message]
2016-12-09  9:56     ` Yao Qi
2016-12-09  9:57 ` [PATCH 0/3] Use code cache in arm and aarch64 prologue analyzer Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53b4ccc4-d0ad-643f-4700-a5ec130eea1f@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox