From: Doug Evans <xdje42@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] symbol lookup cache
Date: Mon, 22 Dec 2014 02:04:00 -0000 [thread overview]
Message-ID: <CAP9bCMTC1tbFMB_6sA6Lmuudc+RRuKvHMn=eRb6Jj6-oXCivsg@mail.gmail.com> (raw)
In-Reply-To: <20141221210151.GL12884@adacore.com>
On Sun, Dec 21, 2014 at 1:01 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Let's first verify the efficacy of the cache, collect some data, and
>> go from there.
>> And the next step after that, besides improving the efficiency of the
>> cache (*1), if the data suggests it, is I think to explore dynamically
>> adjusting the cache size.
>> And if, after that, there are still some important cases where gdb
>> can't do a good enough job on its own, *then* I'd be happy to add some
>> knobs to control the cache size. Maybe the knob we will want is not
>> so much to control the cache size but how it grows.
>
> do you see the amount of data in the cache being all that much?
Nope, and I've noted that in the code.
Plus I recently gained back 40MB for free (16 * #minsyms) on one of my
monster benchmarks.
ref: https://sourceware.org/ml/gdb-patches/2014-11/msg00638.html
We could spend 1/10 that on the cache (which would still be a rather
large cache) and still be way ahead.
> I haven't looked at your implementation, but for Ada, the cache is
> updated when symbols are looked up, usually due to a user querying
> something. So, I don't the cache to be all that big, and FWIW,
> we have never even had to think of having a dynamic hash size.
But, *if* one-size-fits-all *wasn't* working (*1), and I think I can
reasonably assume we're agreed we're not there yet, then would you
immediately go the route of providing a user option to allow changing
the size, or first see if gdb could do better on its own?
---
(*1): I'm only suggesting exploring dynamically adjusting the cache
size (I realize you wrote hash size) *if* the data suggests we need
it. IMO we're not there yet. But, and here's where the disagreement
is (AFAICT), *if* we do get there, I'd rather see if gdb could do
better on its own first, before adding a knob that the user has to
tweak to get the desired performance.
next prev parent reply other threads:[~2014-12-22 2:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 8:23 [RFC] " Doug Evans
2014-12-03 0:50 ` Doug Evans
2014-12-20 7:57 ` [PATCH] " Doug Evans
2014-12-20 8:29 ` Doug Evans
2014-12-20 10:43 ` Eli Zaretskii
2014-12-20 19:14 ` Doug Evans
2014-12-20 19:55 ` Eli Zaretskii
2014-12-20 21:04 ` Doug Evans
2014-12-21 3:34 ` Eli Zaretskii
2014-12-21 18:51 ` Doug Evans
2014-12-21 21:01 ` Joel Brobecker
2014-12-22 2:04 ` Doug Evans [this message]
2014-12-22 12:48 ` Joel Brobecker
2015-01-11 19:11 ` Doug Evans
2014-12-03 2:46 ` [RFC] " Joel Brobecker
2014-12-04 16:38 ` Pedro Alves
2014-12-04 19:17 ` Doug Evans
2014-12-04 19:16 ` Jan Kratochvil
2014-12-04 19:24 ` Doug Evans
2014-12-04 19:28 ` Jan Kratochvil
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='CAP9bCMTC1tbFMB_6sA6Lmuudc+RRuKvHMn=eRb6Jj6-oXCivsg@mail.gmail.com' \
--to=xdje42@gmail.com \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).