From davidw@REDACTED Mon May 3 11:44:18 2004 From: davidw@REDACTED (David N. Welton) Date: 03 May 2004 11:44:18 +0200 Subject: lots of uname syscalls on boot - patch Message-ID: <87r7u1hmkt.fsf@dedasys.com> [ Please CC replies to me. ] Hi, I'm pretty new to Erlang, so maybe there is a good reason for this behavior, but I noticed that when starting up, erlang calls uname (2) a lot: davidw@REDACTED:~$ strace -o output erl ./hw.erl -noinput -s hw main hello world davidw@REDACTED:~$ grep -c uname output 982 I had a go at reducing that in ./erts/emulator/sys/unix/sys.c: void os_flavor(char* namebuf, /* Where to return the name. */ unsigned size) /* Size of name buffer. */ { static int called = 0; static struct utsname uts; /* Information about the system. */ if (called != 1) { (void) uname(&uts); called = 1; } strcpy(namebuf, uts.sysname); for ( ; *namebuf; namebuf++) if (isupper((int) *namebuf)) *namebuf = tolower((int) *namebuf); } This change drammatically reduces the amount of uname syscalls: davidw@REDACTED:~$ strace -o output /home/davidw/download/erlang-9.2/bin/erl ./hw.erl -noinput -s hw main hello world davidw@REDACTED:~$ grep -c uname output 6 It's not that big a deal I guess, but I suppose it speeds things up just a bit. Thankyou, -- David N. Welton Consulting: http://www.dedasys.com/ Personal: http://www.dedasys.com/davidw/ Free Software: http://www.dedasys.com/freesoftware/ Apache Tcl: http://tcl.apache.org/ From mickael.remond@REDACTED Mon May 24 02:25:13 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Mon, 24 May 2004 00:25:13 -0000 Subject: Slight modification to gstk_port_handler.erl Message-ID: Hello, Here is a new version of gstk_port_handler.erl. I have made slight modification to make it look for the proper wish executable on unix and on Windows. I am building an Erlang CDROM where both Windows and Linux binary are included and without this patch, gs looks for wish83.exe even on Linux, because it first look in priv and find the Windows version. Please tell me if you want me to do other changes before inclusion in Erlang/OTP standard release. Thank you in advance. -- Micka?l R?mond http://www.erlang-projects.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: gstk_port_handler.erl Type: application/octet-stream Size: 13993 bytes Desc: not available URL: