This is the mail archive of the gdb-patches@sourceware.org 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: [patch] Speed up find_pc_section


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> Attached patch turns linear search into binary search, speeding up
Paul> find_pc_section drastically :-)

I love patches like this.

Paul> +static int objfiles_updated_p;

This (plus the map itself) seems like another thing that will have to be
per-inferior or per-address-space.  But, perhaps we aren't quite ready
for that yet.

Paul> +  objfiles_updated_p += 1;  /* Rebuild section map next time we need it.  */

It seems like we would need one of these in objfile_relocate, and maybe
in reread_symbols.  What do you think?

Paul> +/* Bsearch comparison function. */
Paul> +
Paul> +int
Paul> +find_pc_section_cmp (const void *key, const void *elt)

Should be static.

Tom


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