aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-20 05:28:07 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-20 05:28:07 +0000
commit2a4e8cc37d3a6ebae8d16a066eea26719c63f561 (patch)
tree4ab29154d7397408d2abadf2300c345a0fd74156 /gdb/solib.c
parent8eb5e289369c2df23f21143caa61b5aea0e19a2f (diff)
downloadgdb-2a4e8cc37d3a6ebae8d16a066eea26719c63f561.zip
gdb-2a4e8cc37d3a6ebae8d16a066eea26719c63f561.tar.gz
gdb-2a4e8cc37d3a6ebae8d16a066eea26719c63f561.tar.bz2
* solib.c (solib_add_common_symbols): Add comment about performance.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index 124acc6..7a2eaec 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -259,6 +259,20 @@ solib_map_sections (so)
#ifndef SVR4_SHARED_LIBS
+/* This routine can be a real performance hog. According to some gprof data
+ which mtranle@paris.IntelliCorp.COM (Minh Tran-Le) sent, almost all the
+ time spend in solib_add (up to 20 minutes with 35 shared libraries) is
+ spent here, with 5/6 in lookup_minimal_symbol and 1/6 in read_memory.
+
+ Possible solutions:
+
+ * Hash the minimal symbols.
+
+ * Just record the name of the minimal symbol and lazily patch the
+ addresses.
+
+ * Tell everyone to switch to Solaris2. */
+
static void
solib_add_common_symbols (rtc_symp, objfile)
struct rtc_symb *rtc_symp;