Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 18, 2012
@rurban rurban [GH #888] Add a cyg-desparse post-linker step
The cygwin linker up until 1.17.18 creates all its exes and shared libs
as sparse files, which reduces startup time of executables by a large percentage
(8-10x slower) because the code cannot be mmap'ed and not cached, it must be read
byte by byte. Again and again.

See http://cygwin.com/ml/cygwin-developers/2012-12/msg00011.html
aee8fdc
@rurban rurban [GH #888] More dll cyg-desparse post-linker steps 6e63a19
Showing with 36 additions and 0 deletions.
  1. +12 −0 config/gen/makefiles/root.in
  2. +7 −0 src/dynoplibs/Rules.in
  3. +10 −0 src/dynpmc/Rules.in
  4. +7 −0 tools/dev/cyg-desparse
View
12 config/gen/makefiles/root.in
@@ -922,6 +922,7 @@ $(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
$(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/parrot_config$(O) src/longopt$(O) \
@@ -930,6 +931,7 @@ $(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
$(DEV_TOOLS_DIR)/pbc_to_exe.pir: $(DEV_TOOLS_DIR)/pbc_to_exe.winxed $(PARROT) $(WINXED_LANG) winxed.pbc
$(PARROT) winxed.pbc -c --noan $(DEV_TOOLS_DIR)/pbc_to_exe.winxed
@@ -937,6 +939,7 @@ $(DEV_TOOLS_DIR)/pbc_to_exe.pir: $(DEV_TOOLS_DIR)/pbc_to_exe.winxed $(PARROT) $(
$(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir $(LIBRARY_DIR)/config.pir $(PARROT) $(DYNEXT_DIR)/file$(LOAD_EXT)
$(PARROT) -o pbc_to_exe.pbc $(DEV_TOOLS_DIR)/pbc_to_exe.pir
$(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc
+#IF(cygwin): tools/dev/cyg-desparse $@
parrot_nci_thunk_gen.pbc : \
$(DEV_TOOLS_DIR)/nci_thunk_gen.pir \
@@ -955,16 +958,19 @@ parrot-prove.pbc : runtime/parrot/bin/prove.pir $(PARROT)
$(PARROT_PROVE) : parrot-prove.pbc $(PARROT) $(PBC_TO_EXE)
$(PBC_TO_EXE) parrot-prove.pbc
+#IF(cygwin): tools/dev/cyg-desparse $@
$(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
$(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
+#IF(cygwin): tools/dev/cyg-desparse $@
$(MINIPARROT) : $(FRP_DIR)/main$(O) $(INC_DIR)/api.h $(INC_DIR)/longopt.h $(LIBPARROT) \
src/null_config$(O) src/longopt$(O)
$(LINK) @ld_out@$@ $(FRP_DIR)/main$(O) src/null_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
#IF(cygwin and optimize):$(INSTALLABLEPARROT) : LINK += -s
$(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
@@ -974,6 +980,7 @@ $(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(FRPTWO_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
$(FRPTWO_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
$(INC_DIR)/context.h : $(INC_PMC_DIR)/pmc_callcontext.h
@@ -1143,6 +1150,7 @@ $(LIBPARROT_SHARED) : $(O_FILES)
#IF(win32 and cc==gcc): -Wl,--out-implib=libparrot.lib \
$(O_FILES) $(C_LIBS) $(ICU_SHARED)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+#IF(cygwin): tools/dev/cyg-desparse $@
#IF(libparrot_shared_alias): ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
$(CP) tools/dev/gdb-pp-load.py @blib_dir@/@libparrot_shared@-gdb.py
$(CP) tools/dev/gdb-pp.py @blib_dir@/GDBPrettyPrint.py
@@ -1176,6 +1184,7 @@ $(PDB) : $(FR_DIR)/parrot_debugger/main$(O) src/parrot_config$(O) $(LIBPARROT)
src/parrot_config$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
#IF(cygwin and optimize):$(INSTALLABLEPDB) : LINK += -s
$(INSTALLABLEPDB) : $(FR_DIR)/parrot_debugger/main$(O) $(LIBPARROT) src/install_config$(O)
@@ -1201,6 +1210,7 @@ $(DIS) : $(FR_DIR)/pbc_disassemble/main$(O) $(LIBPARROT)
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
#IF(cygwin and optimize):$(INSTALLABLEDIS) : LINK += -s
$(INSTALLABLEDIS) : $(FR_DIR)/pbc_disassemble/main$(O) \
@@ -1223,6 +1233,7 @@ $(PDUMP) : $(FR_DIR)/pbc_dump/main$(O) $(FR_DIR)/pbc_dump/packdump$(O) $(LIBPARR
src/longopt$(O) \
$(FR_DIR)/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
$(FR_DIR)/pbc_dump/main$(O) : \
$(INC_DIR)/longopt.h \
@@ -1254,6 +1265,7 @@ $(PBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) src/parrot_config$(O)
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+#IF(cygwin): tools/dev/cyg-desparse $@
#IF(cygwin and optimize):$(INSTALLABLEPBC_MERGE) : LINK += -s
$(INSTALLABLEPBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
View
7 src/dynoplibs/Rules.in
@@ -15,6 +15,7 @@ $(DYNEXT_DIR)/obscure_ops$(LOAD_EXT): src/dynoplibs/obscure_ops$(O) $(LIBPARROT)
src/dynoplibs/obscure_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/obscure_ops$(O): $(DYNOP_O_DEPS) \
@@ -35,6 +36,7 @@ $(DYNEXT_DIR)/math_ops$(LOAD_EXT): src/dynoplibs/math_ops$(O) $(LIBPARROT)
src/dynoplibs/math_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynoplibs/math_ops.c: src/dynoplibs/math.ops $(OPS2C)
$(OPS2C) --dynamic src/dynoplibs/math.ops --quiet
@@ -54,6 +56,7 @@ $(DYNEXT_DIR)/trans_ops$(LOAD_EXT): src/dynoplibs/trans_ops$(O) $(LIBPARROT)
src/dynoplibs/trans_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/trans_ops$(O): $(DYNOP_O_DEPS) \
@@ -73,6 +76,7 @@ $(DYNEXT_DIR)/bit_ops$(LOAD_EXT): src/dynoplibs/bit_ops$(O) $(LIBPARROT)
src/dynoplibs/bit_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/bit_ops$(O): $(DYNOP_O_DEPS) \
@@ -92,6 +96,7 @@ $(DYNEXT_DIR)/debug_ops$(LOAD_EXT): src/dynoplibs/debug_ops$(O) $(LIBPARROT)
src/dynoplibs/debug_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/debug_ops$(O): $(DYNOP_O_DEPS) \
@@ -111,6 +116,7 @@ $(DYNEXT_DIR)/sys_ops$(LOAD_EXT): src/dynoplibs/sys_ops$(O) $(LIBPARROT)
src/dynoplibs/sys_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/sys_ops$(O): $(DYNOP_O_DEPS) \
@@ -130,6 +136,7 @@ $(DYNEXT_DIR)/io_ops$(LOAD_EXT): src/dynoplibs/io_ops$(O) $(LIBPARROT)
src/dynoplibs/io_ops$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
## SUFFIX OVERRIDE - add -Wno-parentheses-equality for clang, with same rule as src/ops/core_ops.c
src/dynoplibs/io_ops$(O): $(DYNOP_O_DEPS) \
View
10 src/dynpmc/Rules.in
@@ -6,6 +6,7 @@ $(DYNEXT_DIR)/dynlexpad$(LOAD_EXT): src/dynpmc/dynlexpad$(O)
src/dynpmc/dynlexpad$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_dynlexpad.h : src/dynpmc/dynlexpad.c
@@ -28,6 +29,7 @@ $(DYNEXT_DIR)/file$(LOAD_EXT): src/dynpmc/file$(O)
src/dynpmc/file$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_file.h : src/dynpmc/file.c
@@ -51,6 +53,7 @@ $(DYNEXT_DIR)/foo_group$(LOAD_EXT): $(DYNPMC_FOO_OBJS) src/dynpmc/foo_group$(O)
src/dynpmc/foo_group$(O) $(DYNPMC_FOO_OBJS) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/foo_group$(O): \
src/dynpmc/pmc_foo2.h \
@@ -102,6 +105,7 @@ $(DYNEXT_DIR)/gziphandle$(LOAD_EXT): src/dynpmc/gziphandle$(O)
src/dynpmc/gziphandle$(O) $(LINKARGS) $(LIB_ZLIB)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_gziphandle.h : src/dynpmc/gziphandle.c
@@ -126,6 +130,7 @@ $(DYNEXT_DIR)/os$(LOAD_EXT): src/dynpmc/osdummy$(O)
src/dynpmc/osdummy$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_osdummy.h : src/dynpmc/osdummy.c
@@ -147,6 +152,7 @@ $(DYNEXT_DIR)/pccmethod_test$(LOAD_EXT): src/dynpmc/pccmethod_test$(O)
src/dynpmc/pccmethod_test$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_pccmethod_test.h : src/dynpmc/pccmethod_test.c
@@ -170,6 +176,7 @@ $(DYNEXT_DIR)/rotest$(LOAD_EXT): src/dynpmc/rotest$(O)
src/dynpmc/rotest$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_rotest.h : src/dynpmc/rotest.c
@@ -195,6 +202,7 @@ $(DYNEXT_DIR)/rational$(LOAD_EXT): src/dynpmc/rational$(O)
src/dynpmc/rational$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_rational.h : src/dynpmc/rational.c
@@ -218,6 +226,7 @@ $(DYNEXT_DIR)/subproxy$(LOAD_EXT): src/dynpmc/subproxy$(O)
src/dynpmc/subproxy$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_subproxy.h : src/dynpmc/subproxy.c
@@ -240,6 +249,7 @@ $(DYNEXT_DIR)/select$(LOAD_EXT): src/dynpmc/select$(O)
src/dynpmc/select$(O) $(LINKARGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
#IF(cygwin or hpux): $(CHMOD) 0775 $@
+#IF(cygwin): tools/dev/cyg-desparse $@
src/dynpmc/pmc_select.h : src/dynpmc/select.c
View
7 tools/dev/cyg-desparse
@@ -0,0 +1,7 @@
+#!/bin/sh
+# The cygwin linker creates sparse files.
+# Remove sparse fs bit from cygwin executables,
+# otherwise calling such an executable/dll is slow
+tmp="$1.tmp"
+/bin/cp "$1" "$tmp"
+/bin/mv "$tmp" "$1"

No commit comments for this range

Something went wrong with that request. Please try again.