From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
tromey@redhat.com, gdb-patches@sourceware.org
Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs.
Date: Mon, 22 Jun 2009 22:04:00 -0000 [thread overview]
Message-ID: <8ac60eac0906221504l17329986yb36a5a1cae2412b@mail.gmail.com> (raw)
In-Reply-To: <200906222006.n5MK6MAP015693@d12av02.megacenter.de.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
On Mon, Jun 22, 2009 at 1:06 PM, Ulrich Weigand<uweigand@de.ibm.com> wrote:
>> Perhaps a better alternative is to restore the overlay-bp-reset behavior to
>> "before 2009-05-12" commit: now that this change is in:
Here is the patch to do that.
Tested on Linux/x86_64.
I also verified that create_overlay_event_breakpoint is not called for
each solib (though it is called 7 times, which seems like 6 too many).
Thanks,
--
Paul Pluzhnikov
2009-06-22 Paul Pluzhnikov <ppluzhnikov@google.com>
Revert 2009-05-14 breakpoint commit (no longer needed).
* breakpoint.h (breakpoint_re_set_objfile): Remove
* breakpoint.c (breakpoint_re_set_objfile): Likewise
(create_overlay_event_breakpoint_1): Resurrect.
(create_overlay_event_breakpoint): Likewise.
* objfiles.c (objfile_relocate): Update.
* symfile.c (new_symfile_objfile): Likewise.
[-- Attachment #2: gdb-overlay-bp-20090622-2.txt --]
[-- Type: text/plain, Size: 4282 bytes --]
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.407
diff -u -p -u -r1.407 breakpoint.c
--- breakpoint.c 19 Jun 2009 15:14:11 -0000 1.407
+++ breakpoint.c 22 Jun 2009 21:38:14 -0000
@@ -1476,7 +1476,7 @@ create_internal_breakpoint (CORE_ADDR ad
}
static void
-create_overlay_event_breakpoint (char *func_name, struct objfile *objfile)
+create_overlay_event_breakpoint_1 (char *func_name, struct objfile *objfile)
{
struct breakpoint *b;
struct minimal_symbol *m;
@@ -1502,13 +1502,20 @@ create_overlay_event_breakpoint (char *f
update_global_location_list (1);
}
+static void
+create_overlay_event_breakpoint (char *func_name)
+{
+ struct objfile *objfile;
+ ALL_OBJFILES (objfile)
+ create_overlay_event_breakpoint_1 (func_name, objfile);
+}
+
void
update_breakpoints_after_exec (void)
{
struct breakpoint *b;
struct breakpoint *temp;
struct bp_location *bploc;
- struct objfile *objfile;
/* We're about to delete breakpoints from GDB's lists. If the
INSERTED flag is true, GDB will try to lift the breakpoints by
@@ -1603,8 +1610,7 @@ update_breakpoints_after_exec (void)
}
}
/* FIXME what about longjmp breakpoints? Re-create them here? */
- ALL_OBJFILES (objfile)
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
+ create_overlay_event_breakpoint ("_ovly_debug_event");
}
int
@@ -7771,13 +7777,9 @@ breakpoint_re_set_one (void *bint)
return 0;
}
-/* 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. */
-
+/* Re-set all breakpoints after symbols have been re-loaded. */
void
-breakpoint_re_set_objfile (struct objfile *objfile)
+breakpoint_re_set (void)
{
struct breakpoint *b, *temp;
enum language save_language;
@@ -7797,19 +7799,7 @@ breakpoint_re_set_objfile (struct objfil
set_language (save_language);
input_radix = save_input_radix;
- if (objfile == NULL)
- ALL_OBJFILES (objfile)
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
- else
- create_overlay_event_breakpoint ("_ovly_debug_event", objfile);
-}
-
-/* Re-set all breakpoints after symbols have been re-loaded. */
-
-void
-breakpoint_re_set (void)
-{
- breakpoint_re_set_objfile (NULL);
+ create_overlay_event_breakpoint ("_ovly_debug_event");
}
\f
/* Reset the thread number of this breakpoint:
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.92
diff -u -p -u -r1.92 breakpoint.h
--- breakpoint.h 24 May 2009 18:00:08 -0000 1.92
+++ breakpoint.h 22 Jun 2009 21:38:14 -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: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.83
diff -u -p -u -r1.83 objfiles.c
--- objfiles.c 14 May 2009 23:33:08 -0000 1.83
+++ objfiles.c 22 Jun 2009 21:38:14 -0000
@@ -674,7 +674,7 @@ objfile_relocate (struct objfile *objfil
}
/* Relocate breakpoints as necessary, after things are relocated. */
- breakpoint_re_set_objfile (objfile);
+ breakpoint_re_set ();
}
\f
/* Many places in gdb want to test just to see if we have any partial
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.232
diff -u -p -u -r1.232 symfile.c
--- symfile.c 17 Jun 2009 18:34:34 -0000 1.232
+++ symfile.c 22 Jun 2009 21:38:15 -0000
@@ -919,7 +919,7 @@ new_symfile_objfile (struct objfile *obj
}
else if ((add_flags & SYMFILE_DEFER_BP_RESET) == 0)
{
- breakpoint_re_set_objfile (objfile);
+ breakpoint_re_set ();
}
/* We're done reading the symbol file; finish off complaints. */
next prev parent reply other threads:[~2009-06-22 22:04 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
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 [this message]
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=8ac60eac0906221504l17329986yb36a5a1cae2412b@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=uweigand@de.ibm.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