msys-runtime Log


Commit Date  
[129f1c] by Kirill Smelkov Kirill Smelkov , pushed by Cesar Strauss Cesar Strauss

Don't pull user32.dll & friends just to detect whether right alt should be used as meta

I've discovered that every msys program pulls lots of dlls on startup.
In particular the following simple program

---- 8< ----
#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("Hello World\n");
exit(1);
}
---- 8< -----

when compiled with mingw compiler, executes almost instantly, but when
compiled with msys compiler and linked with msys.dll, starts
significantly longer - ~0.2 - 0.5 seconds depending on machine.

As Kirill K. Smirnov already found[1] the problem lies in that on
startup, msys.dll pulls in user32.dll and does lot's of "unnecessary
things". And the following test justifies it:

$ WINEDEBUG=loaddll wine xmsys.exe
trace:loaddll:load_builtin_dll Loaded L"KERNEL32.dll" at 0x7ed50000: builtin
trace:loaddll:load_native_dll Loaded L"Z:\\home\\kirr\\src\\tools\\git\\msysgit\\bin\\xmsys.exe" at 0x400000: native
trace:loaddll:load_native_dll Loaded L"Z:\\home\\kirr\\src\\tools\\git\\msysgit\\bin\\msys-1.0.dll" at 0x68000000: native
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\advapi32.dll" at 0x7e950000: builtin
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\gdi32.dll" at 0x7e780000: builtin
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\version.dll" at 0x7ef30000: builtin
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\user32.dll" at 0x7e820000: builtin
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\imm32.dll" at 0x7e410000: builtin
trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\winex11.drv" at 0x7e5c0000: builtin

Investigating showed that msys.dll imports kernel32.dll only, but also
implements some form of lazy-import (see .../winsup/cygwin/autoload.cc)
for symbols from other dlls, with the intention (as I see it) not to
other system dlls until needed.

But also, it turned out, that in order to see whether AltGr should be
used as META or not, on _every_ msys startup, we were calling
GetKeyboardLayout() which is from user32.dll OOPS...

Avoid that, and suddenly my test program runs significantly faster. It
still pulls in advapi32.dll - this can be investigated later...

[1] http://bugs.winehq.org/show_bug.cgi?id=13606#c8

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>

2013-07-12 01:48:51 Tree
[77f246] (MSYS-1_0_18) by Cesar Strauss Cesar Strauss

Increment version to 1.0.18.

2012-11-22 00:11:13 Tree
[7c538e] by Cesar Strauss Cesar Strauss

Enable quoting of globbing characters on the command-line of native applications.

2012-11-08 00:18:02 Tree
[f26ab6] by Cesar Strauss Cesar Strauss

In case of an absent /etc directory, keep on trying to monitor the root directory for its creation instead of silently failing.

2011-10-12 18:35:00 Tree
[f7a2ac] by Cesar Strauss Cesar Strauss

Fix getpwnam to return NULL for unknown user names, and be more robust when HOME is not set.

2011-10-12 14:49:20 Tree
[82c6fd] by Charles Wilson Charles Wilson

Import Cygwin 1.3.4 and port modern wincap functionality

2011-09-04 23:46:54 Tree
[6fa631] (MSYS-1_0_17) by Cesar Strauss Cesar Strauss

Increment version to 1.0.17.

2011-04-19 00:46:34 Tree
[631f57] by Cesar Strauss Cesar Strauss

Allow overriding the error mode for Windows exceptions like GPF.

2011-04-19 00:43:38 Tree
[83e576] by Charles Wilson Charles Wilson

Avoid calling fsync on closed fd

2011-03-31 13:28:07 Tree
[20b458] (MSYS-1_0_16) by Cesar Strauss Cesar Strauss

Increment version to 1.0.16.

2010-09-28 22:50:32 Tree
[ff513e] by Cesar Strauss Cesar Strauss

Be more robust when dealing with ambiguous paths and mount points

2010-09-16 22:53:14 Tree
[35fb23] by Charles Wilson Charles Wilson

Add CW_SYNC_WINENV cygwin_internal system call

2010-09-07 03:52:30 Tree
[4f56a6] by Charles Wilson Charles Wilson

Support conversion of response file (@file) cmdline args

2010-09-07 03:51:04 Tree
[34a5b2] by Cesar Strauss Cesar Strauss

Align msys_symlink argument order with POSIX and fix a memory leak

2010-08-24 00:17:09 Tree
[404191] by Cesar Strauss Cesar Strauss

Fix a race condition when determining if a pid is valid.

2010-08-13 02:43:21 Tree
[5eb121] by Cesar Strauss Cesar Strauss

Increment version to 1.0.15 and change the base address to 0x60800000.

2010-07-06 22:37:12 Tree
[7b2398] by Cesar Strauss Cesar Strauss

Avoid a dependency of strace on the MinGW GCC shared runtimes.

2010-07-06 22:19:39 Tree
[41e320] by Charles Wilson Charles Wilson

Don't apply pseudo-relocs again in child after fork()

2010-05-19 03:51:25 Tree
[2410c9] by Charles Wilson Charles Wilson

Align getdomainname() signature with include/netdb.h

2010-05-19 03:38:15 Tree
[fa1e1f] by Charles Wilson Charles Wilson

* libc/include/sys/unistd.h: Declare fchdir and getdomainname.

2010-03-31 02:17:16 Tree
[c962e5] by Charles Wilson Charles Wilson

* include/netdb.h: Declare rcmd, rexec, and rresvport.

2010-03-31 02:16:13 Tree
[e1c2e4] (MSYS-1_0_14) by Cesar Strauss Cesar Strauss

Fix path translation in presence of components with dots.

* path.cc (msys_p2w): Search the whole string for a ".."
component, instead of stopping at the first ".".
* include/cygwin/version.h: Increment version to 1.0.14.

2010-03-18 01:16:35 Tree
[1091ed] by Cesar Strauss Cesar Strauss

Avoid reading a string past its end.

* path.cc (msys_p2w): Check for end-of-string before "/"
for an argument beginning with "-".

2010-01-15 21:24:33 Tree
[8ebd10] by Cesar Strauss Cesar Strauss

Improve documentation.

* path.cc (msys_p2w): Improve documentation.

2010-01-15 18:45:20 Tree
[f8ca06] by Cesar Strauss Cesar Strauss

Add sanity checks to avoid possible crash.

* ismsys.cc (GetFileDataStr): null-terminate the return data.
(IsMsys): Bound-check the pointer passed to strcmp.

2010-01-15 16:28:10 Tree
Older >