From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [wip] Delete prev_func_name and ecs->stop_func_name
Date: Wed, 16 Apr 2003 14:28:00 -0000 [thread overview]
Message-ID: <3E9D689A.2010803@redhat.com> (raw)
In-Reply-To: <20030416133745.GA6991@nevyn.them.org>
> On Wed, Apr 16, 2003 at 12:29:25AM -0400, Andrew Cagney wrote:
>
>> Running the i386 testsuite with gcov on an existing GDB reveals:
>>
>> int
>> find_pc_sect_partial_function
>> 10133 {
>> 10133 struct partial_symtab *pst;
>> struct symbol *f;
>> struct minimal_symbol *msymbol;
>> struct partial_symbol *psb;
>> struct obj_section *osect;
>> int i;
>> CORE_ADDR mapped_pc;
>>
>> 10133 mapped_pc = overlay_mapped_address (pc, section);
>>
>> 10133 if (mapped_pc >= cache_pc_function_low
>> && mapped_pc < cache_pc_function_high
>> && section == cache_pc_function_section)
>> 3565 goto return_cached_value;
>>
>> 3565 if (SIGTRAMP_START_P () && ...
>>
>> that is, 10133 calls to find_pc_sect_partial_function, 3565 of which
>> missed in the cache. Modifying infrun.c so that it doesn't cache the
>> name turns up:
>>
>> int
>> find_pc_sect_partial_function
>> 12087 {
>> 12087 struct partial_symtab *pst;
>> struct symbol *f;
>> struct minimal_symbol *msymbol;
>> struct partial_symbol *psb;
>> struct obj_section *osect;
>> int i;
>> CORE_ADDR mapped_pc;
>>
>> 12087 mapped_pc = overlay_mapped_address (pc, section);
>>
>> 12087 if (mapped_pc >= cache_pc_function_low
>> && mapped_pc < cache_pc_function_high
>> && section == cache_pc_function_section)
>> 3569 goto return_cached_value;
>
>
> What're the following lines for both of these? There's some
> optimization at work here, or these numbers show the exact opposite of
> what you want. That's 3569 _hits_ to the cache.
No.
> But matching the
> execution count for the line after the goto is suspicious.
It's gcov playing tricks, the goto is being counted in the false path.
The first analysis illustrates this:
>>> 3565 goto return_cached_value;
>>>
>>> 3565 if (SIGTRAMP_START_P () && ...
and the second is identical.
Andrew
next prev parent reply other threads:[~2003-04-16 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-16 4:29 Andrew Cagney
2003-04-16 13:37 ` Daniel Jacobowitz
2003-04-16 14:28 ` Andrew Cagney [this message]
2003-04-16 14:43 ` Daniel Jacobowitz
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=3E9D689A.2010803@redhat.com \
--to=ac131313@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.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