[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-optimize
Subject: making use of --dynamic-list-cpp-typeinfo
From: Dirk Mueller <mueller () kde ! org>
Date: 2006-09-19 15:11:29
Message-ID: 200609191711.29940.mueller () kde ! org
[Download RAW message or body]
Hi,
since about a week, the GNU binutils have gained support for reducing
intra-shared lib relocation overhead. Via a special flag, you can ask the
linker to resolve relocations any uninteresting or only a certain set of
symbols always internally. This is a significant gain for C++, where you
normally don't make use of LD_PRELOAD's that overwrite C++ mangled symbols.
I've tested this against libqt3-3.3.6, and it reduces the symbol relocations
by about 60%, reducing library footprint by about 8% and improving relocation
startup time by far more than 50%.
On a fully internally linked KDE 3.x system, I measured a relocation speedup
of something between 20-40%. I've not done login time benchmarking.
Below is a patch for KDE 3.x for further testing.
Dirk
["diff" (text/x-diff)]
Index: admin/acinclude.m4.in
===================================================================
--- admin/acinclude.m4.in (revision 585965)
+++ admin/acinclude.m4.in (working copy)
@@ -991,7 +991,7 @@ if test -z "$kde_x_libraries" || test "x
X_LDFLAGS="-L$x_libraries"
fi
all_includes="$X_INCLUDES"
-all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS $LDFLAGS_DYNAMIC_LIST"
# Check for libraries that X11R6 Xt/Xaw programs need.
ac_save_LDFLAGS="$LDFLAGS"
@@ -1727,6 +1727,16 @@ AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
AC_SUBST(LDFLAGS_NEW_DTAGS)
])
+dnl Check if the linker supports --dynamic-list-cpp-typeinfo
+AC_DEFUN([KDE_CHECK_DYNAMIC_LIST],
+[
+ LDFLAGS_DYNAMIC_LIST=""
+ KDE_CHECK_COMPILER_FLAG([Wl,--dynamic-list-cpp-typeinfo],
+ [LDFLAGS_DYNAMIC_LIST="-Wl,--dynamic-list-cpp-typeinfo"])
+
+ AC_SUBST(LDFLAGS_DYNAMIC_LIST)
+])
+
AC_DEFUN([KDE_CHECK_NMCHECK],
[
AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
@@ -3347,6 +3357,7 @@ AC_DEFUN([AC_CHECK_COMPILERS],
AC_SUBST(ENABLE_PERMISSIVE_FLAG)
KDE_CHECK_NEW_LDFLAGS
+ KDE_CHECK_DYNAMIC_LIST
KDE_CHECK_FINAL
KDE_CHECK_CLOSURE
KDE_CHECK_NMCHECK
_______________________________________________
Kde-optimize mailing list
Kde-optimize@kde.org
https://mail.kde.org/mailman/listinfo/kde-optimize
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic