[cfe-commits] r64882 - /cfe/trunk/Driver/Makefile

Daniel Dunbar daniel at zuster.org
Tue Feb 17 20:59:39 PST 2009


nice!

On Tue, Feb 17, 2009 at 8:02 PM, Chris Lattner <sabre at nondot.org> wrote:
> Author: lattner
> Date: Tue Feb 17 22:02:00 2009
> New Revision: 64882
>
> URL: http://llvm.org/viewvc/llvm-project?rev=64882&view=rev
> Log:
> Optimize dyld startup time by specifying a trivial export map
> (only export main) on the mac.
>
> This improves DYLD_PRINT_STATISTICS from:
> total time: 6.0 milliseconds (100.0%)
> total images loaded:  5 (4 from dyld shared cache, 3 needed no fixups)
> total segments mapped: 0, into 0 pages with 0 pages pre-fetched
> total images loading time: 0.0 milliseconds (1.4%)
> total rebase fixups:  0
> total rebase fixups time: 0.0 milliseconds (0.0%)
> total binding fixups: 7,928
> total binding symbol lookups: 4,087, average images searched per symbol: 1.9
> total binding fixups time: 4.7 milliseconds (79.2%)
> total bindings lazily fixed up: 170 of 4,372
> total init time time: 1.1 milliseconds (19.2%)
> total images with weak exports:  2
>
> to:
> total time: 1.4 milliseconds (100.0%)
> total images loaded:  5 (4 from dyld shared cache, 4 needed no fixups)
> total segments mapped: 0, into 0 pages with 0 pages pre-fetched
> total images loading time: 0.0 milliseconds (5.7%)
> total rebase fixups:  0
> total rebase fixups time: 0.0 milliseconds (0.2%)
> total binding fixups: 1,079
> total binding symbol lookups: 75, average images searched per symbol: 1.0
> total binding fixups time: 0.5 milliseconds (33.9%)
> total bindings lazily fixed up: 14 of 216
> total init time time: 0.8 milliseconds (60.0%)
> total images with weak exports:  1
>
> This reduces the time to -fsyntax-only cocoa.h with PTH from 0.192s to 0.184 (4.3%)
>
> rdar://6505315
>
>
> Modified:
>    cfe/trunk/Driver/Makefile
>
> Modified: cfe/trunk/Driver/Makefile
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/Makefile?rev=64882&r1=64881&r2=64882&view=diff
>
> ==============================================================================
> --- cfe/trunk/Driver/Makefile (original)
> +++ cfe/trunk/Driver/Makefile Tue Feb 17 22:02:00 2009
> @@ -8,6 +8,12 @@
>  # early so we can set up LINK_COMPONENTS before including Makefile.rules
>  include $(LEVEL)/Makefile.config
>
> +# Optimize startup time of the app by not exporting all of the weak symbols
> +# from the binary.  This reduces dyld startup time by 4x.
> +ifeq ($(OS),Darwin)
> +LD.Flags += -Wl,-exported_symbol -Wl,_main
> +endif
> +
>  LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag
>  USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a   \
>            clangDriver.a clangAST.a clangParse.a clangLex.a            \
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list