From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
Date: Wed, 29 Apr 2009 21:12:00 -0000 [thread overview]
Message-ID: <8ac60eac0904291411o4666b3eha30d95cc88811dd5@mail.gmail.com> (raw)
In-Reply-To: <m3y6tu24ty.fsf@fleche.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]
On Mon, Apr 20, 2009 at 6:06 PM, Tom Tromey <tromey@redhat.com> wrote:
> Paul> To address the repeated scanning for objective-c, I propose adding
> Paul> n_objc_syms to the struct objstats, initializing that field to ~0,
>
> I wonder whether it should use the generic per-objfile data storage
> stuff, rather than sticking ObjC-specific stuff directly into the
> objfile.
Thanks, this is probably a good idea. I'll work on that next.
> Paul> /* Re-set all breakpoints after symbols have been re-loaded. */
> Paul> void
> Paul> -breakpoint_re_set (void)
> Paul> +breakpoint_re_set_objfile (struct objfile *objfile)
>
> The new argument needs a description in the function header.
Done.
OK to commit?
Thanks,
--
Paul Pluzhnikov
2009-04-29 Paul Pluzhnikov <ppluzhnikov@google.com>
* breakpoint.h: Add breakpoint_re_set_objfile prototype.
* breakpoint.c (breakpoint_re_set_objfile): Don't rescan
all objfiles unnecessarily.
(breakpoint_re_set): New function.
* symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
instead of breakpoint_re_set.
* objfiles.c (objfile_relocate): Likewise.
[-- Attachment #2: gdb-breakpoint-20090429.txt --]
[-- Type: text/plain, Size: 3004 bytes --]
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.90
diff -u -p -u -r1.90 breakpoint.h
--- breakpoint.h 31 Mar 2009 16:44:17 -0000 1.90
+++ breakpoint.h 29 Apr 2009 21:07:03 -0000
@@ -687,7 +687,7 @@ extern int breakpoint_thread_match (CORE
extern void until_break_command (char *, int, int);
extern void breakpoint_re_set (void);
-
+extern void breakpoint_re_set_objfile (struct objfile *);
extern void breakpoint_re_set_thread (struct breakpoint *);
extern struct breakpoint *set_momentary_breakpoint
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.392
diff -u -p -u -r1.392 breakpoint.c
--- breakpoint.c 29 Apr 2009 19:31:58 -0000 1.392
+++ breakpoint.c 29 Apr 2009 21:07:04 -0000
@@ -7709,9 +7709,13 @@ breakpoint_re_set_one (void *bint)
return 0;
}
-/* Re-set all breakpoints after symbols have been re-loaded. */
+/* Re-set all breakpoints after symbols have been re-loaded.
+
+ If OBJFILE is non-null, create overlay break point only in OBJFILE
+ (speed optimization). Otherwise rescan all loaded objfiles. */
+
void
-breakpoint_re_set (void)
+breakpoint_re_set_objfile (struct objfile *objfile)
{
struct breakpoint *b, *temp;
enum language save_language;
@@ -7730,8 +7734,19 @@ breakpoint_re_set (void)
}
set_language (save_language);
input_radix = save_input_radix;
-
- create_overlay_event_breakpoint ("_ovly_debug_event");
+
+ if (objfile != NULL)
+ create_overlay_event_breakpoint_1 ("_ovly_debug_event", objfile);
+ else
+ create_overlay_event_breakpoint ("_ovly_debug_event");
+}
+
+/* Re-set all breakpoints after symbols have been re-loaded. */
+
+void
+breakpoint_re_set (void)
+{
+ breakpoint_re_set_objfile (NULL);
}
\f
/* Reset the thread number of this breakpoint:
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.224
diff -u -p -u -r1.224 symfile.c
--- symfile.c 7 Apr 2009 20:43:51 -0000 1.224
+++ symfile.c 29 Apr 2009 21:07:04 -0000
@@ -922,7 +922,7 @@ new_symfile_objfile (struct objfile *obj
}
else
{
- breakpoint_re_set ();
+ breakpoint_re_set_objfile (objfile);
}
/* We're done reading the symbol file; finish off complaints. */
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.82
diff -u -p -u -r1.82 objfiles.c
--- objfiles.c 11 Mar 2009 20:26:02 -0000 1.82
+++ objfiles.c 29 Apr 2009 21:07:04 -0000
@@ -674,7 +674,7 @@ objfile_relocate (struct objfile *objfil
}
/* Relocate breakpoints as necessary, after things are relocated. */
- breakpoint_re_set ();
+ breakpoint_re_set_objfile (objfile);
}
\f
/* Many places in gdb want to test just to see if we have any partial
next prev parent reply other threads:[~2009-04-29 21:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 23:29 Paul Pluzhnikov
2009-04-21 1:06 ` Tom Tromey
2009-04-29 21:12 ` Paul Pluzhnikov [this message]
2009-05-12 8:48 ` Joel Brobecker
2009-05-12 21:21 ` Paul Pluzhnikov
2009-05-13 9:39 ` Joel Brobecker
2009-06-22 17:10 ` Ulrich Weigand
2009-06-22 18:56 ` Paul Pluzhnikov
2009-06-22 19:30 ` Ulrich Weigand
2009-06-22 19:42 ` Paul Pluzhnikov
2009-06-22 20:06 ` Ulrich Weigand
2009-06-22 22:04 ` Paul Pluzhnikov
2009-06-23 0:43 ` Ulrich Weigand
2009-06-23 1:33 ` Paul Pluzhnikov
2009-06-23 13:32 ` Ulrich Weigand
2009-06-22 20:41 ` Doug Evans
2009-06-22 20:48 ` Michael Snyder
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=8ac60eac0904291411o4666b3eha30d95cc88811dd5@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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