Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Klee Dienes <kdienes@apple.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Cached function lookup
Date: Sat, 09 Mar 2002 21:54:00 -0000	[thread overview]
Message-ID: <3C8AF521.9080704@cygnus.com> (raw)
In-Reply-To: <8A9ABA76-1A1B-11D6-BA6D-0030653FA4C6@apple.com>

> This patch allows functions in the target used by GDB ("malloc",
> "scm_lookup_cstr", and later a ton of Objective-C functions) to have
> their values cached and re-used unless the symbol table has changed
> in-between calls.  This is a performance win overall, and a particular
> win when dispatching Objective-C method calls and looking up
> Objective-C type information from the runtime.

For the breakpoint changes, assuming that the function-cache code is 
committed, can the two declarations:

> +extern unsigned int symbol_generation;
> +
>  /* Interface:  */
>  /* Clear a bpstat so that it says we are not at any breakpoint.
>     Also free any storage that is part of a bpstat.  */
> @@ -525,6 +527,8 @@
>  extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
> 
>  extern void until_break_command (char *, int);
> +
> +extern void breakpoint_update (void);

be removed (made static)?

Can I suggest adding a comment explaining that the re_set is delayed 
until the breakpoints are re-inserted.

>  extern void breakpoint_re_set (void);


Hmm, I can think of two race conditions:

o 
with the function-cache code - I don't think
	this matters - the cache is always flushed flushed
	before breakpoint code does the update (and the
	breakpoint code doesn't actually use the function
	cache (?)).

o 
with things like ``info breakpoints''
	Do those functions also need to breakpoint_update()?

enjoy,
Andrew



      parent reply	other threads:[~2002-03-10  5:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05  1:34 Klee Dienes
2002-02-06 10:58 ` Jim Blandy
2002-02-28  7:22 ` Andrew Cagney
2002-03-09 21:42 ` Andrew Cagney
2002-03-09 21:54 ` Andrew Cagney [this message]

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=3C8AF521.9080704@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kdienes@apple.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