This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Cached function lookup


> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]