aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2010-02-10OTP-8420 Fix processes in exiting status that are about to be scheduled,Björn-Egil Dahlberg
to not be allowed to garbage collect.
2010-02-10Merge branch 'egil/lcnt' into ccase/r13b04_devErlang/OTP
* egil/lcnt: Add test suite for lcnt in tools Add lcnt:rt_opt/1 bindings to erts_debug Add runtime option to enable/disable lcnt stats Add auto width on string output Add lcnt documentation Add lock profiling tool OTP-8424 Add lock profiling tool. The Lock profiling tool, lcnt, can make use of the internal lock statistics when the runtime system is built with this feature enabled. This provides a mechanism to examine potential lock bottlenecks within the runtime itself. - Add erts_debug:lock_counters({copy_save, bool()}). This option enables or disables statistics saving for destroyed processes and ets-tables. Enabling this might consume a lot of memory. - Add id-numbering for lock classes which is otherwise undefined.
2010-02-10Change erts/etc/unix/Install.src to explicitly set exit code to 0 at the end ↵Kenji Rikitake
of the script This patch will ensure the Install.src script to exit with the exit code 0 when the execution finished at the end of the script. Originally from FreeBSD port patch.
2010-02-10Fix the shell operator bug of "==" to "=" in erts/configure.inKenji Rikitake
In UNIX test command, "==" is incorrect for string comparison; "=" is the right operator. Originally pointed out by Giacomo Olgeni in the following article: http://www.erlang.org/pipermail/erlang-patches/2008-November/000334.html and available as a FreeBSD port patch. Accordingly fixed in erts/configure.in
2010-02-10OTP-8422 Removed bogus "\011" character sequence in documentation.Hans Bolinder
2010-02-10Merge branch 'pan/enable_m32_build' into ccase/r13b04_devErlang/OTP
* pan/enable_m32_build: Teach configure --enable-m32-build for forcing a 32-bit build OTP-8415 configure learned the option --enable-m32-build to force the building of a 32-bit run-time on systems where the default C compiler generates 64-bit executables by default.
2010-02-10Merge branch 'rani/inet_gethostbyname_fixes' into ccase/r13b04_devErlang/OTP
* rani/inet_gethostbyname_fixes: inet_res_SUITE: testcase fixes for legacy DNS resolver (Solaris 8) inet_res: /etc/resolv.conf: use domain as default search list inet: delayed/avoided read of /etc/resolv.conf and /etc/hosts inet_gethost_native: workaround for empty result hostname on MacOS X inet_res_SUITE: testcase fix for empty domain name inet:gethostbyname improved to parse IP strings and look up own hostname OTP-8426 The resolver routines failed to look up the own node name as hostname, if the OS native resolver was erroneously configured, bug reported by Yogish Baliga, now fixed. The resolver routines now tries to parse the hostname as an IP string as most OS resolvers do, unless the native resolver is used. The DNS resolver inet_res and file resolver inet_hosts now do not read OS configuration files until they are needed. Since the native resolver is default, in most cases they are never needed. The DNS resolver's automatic updating of OS configuration file data (/etc/resolv.conf) now uses the 'domain' keyword as default search domain if there is no 'search' keyword.
2010-02-09OTP-8427 Removed spurious options to the emulator from escript.Håkan Mattsson
2010-02-09inet:gethostbyname improved to parse IP strings and look up own hostnameRaimo Niskanen
Now inet:gethostbyname tries to parse the hostname as an IP string first if the 'native' lookup method is not used. One can also make the IP string parsing explicit using the new 'string' lookup method, or avoid it using the new pseudo lookup method 'nostring'. In R13B04 a bug was introduced when the gethostbyname code was rewritten, so if the native resolver was used and misconfigured to not be able to look up the own hostname, inet:gethostbyname also failed. This is now fixed.
2010-02-09OTP-8417 Improved handling of symbolic links to escriptsHåkan Mattsson
2010-02-08Add runtime option to enable/disable lcnt statsBjörn-Egil Dahlberg
Add erts_debug:lock_counters({copy_save, bool()}). This option enables or disables statistics saving for destroyed processes and ets-tables. Enabling this might consume a lot of memory. Add id-numbering for lock classes which is otherwise undefined.
2010-02-08Merge branch 'gc/hipe_darwin_amd64' into ccase/r13b04_devErlang/OTP
* gc/hipe_darwin_amd64: Fix hipe memory allocation problems on darwin/amd64 Porting x86 darwin fixes to amd64 darwin hipe asm/m4 code Automatically enable hipe for darwin/amd64 builds Allow configure to enable_hipe for darwin/amd64 builds OTP-8416 HiPE now works in the 64-bit emulator on Mac OS X. (Thanks to Geoff Cant.)
2010-02-08OTP-8412 Fixed numerous compiler warnings generated by gcc 4.4.1 andRickard Green
tile-cc 2.0.1.78377 when compiling the runtime system.
2010-02-08OTP-8323 Cross compilation improvements and other build systemRickard Green
improvements. Most notable: Lots of cross compilation improvements. The old cross compilation support was more or less non-existing as well as broken. Please, note that the cross compilation support should still be considered as experimental. Also note that old cross compilation configurations cannot be used without modifications. For more information on cross compiling Erlang/OTP see the $ERL_TOP/xcomp/README file. Support for staged install using <url href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed. For more information see the $ERL_TOP/README file. Documentation of the release target of the top Makefile. For more information see the $ERL_TOP/README file. make install now by default creates relative symbolic links instead of absolute ones. For more information see the $ERL_TOP/README file. $ERL_TOP/configure --help=recursive now works and prints help for all applications with configure scripts. Doing make install, or make release directly after make all no longer triggers miscellaneous rebuilds. Existing bootstrap system is now used when doing make install, or make release without a preceding make all. The crypto and ssl applications use the same runtime library path when dynamically linking against libssl.so and libcrypto.so. The runtime library search path has also been extended. The configure scripts of erl_interface and odbc now search for thread libraries and thread library quirks the same way as erts do. The configure script of the odbc application now also looks for odbc libraries in lib64 and lib/64 directories when building on a 64-bit system. The config.h.in file in the erl_interface application is now automatically generated in instead of statically updated which reduces the risk of configure tests without any effect.
2010-02-06Fix hipe memory allocation problems on darwin/amd64Geoff Cant
HiPE on amd64 needs to be able to allocate memory in the 0x20000000+ range so that compiled code will be addressable with 32bit pointers (when sign extended). By default, when building 64bit executables on OS X, PAGEZERO occupies the first 4GB of virtual memory. The PAGEZERO segment cannot be mmap(ed) or vm_allocate(d) into. To avoid this problem we use the -pagezero_size linker flag to reduce the size of PAGEZERO and free up the 0x20000000+ space.
2010-02-06Porting x86 darwin fixes to amd64 darwin hipe asm/m4 codeGeoff Cant
Compared to GNU as, Mac OS X's assembler uses different directives for text and global sections, and omits type and size directives entirely. We also need to mangle symbol names in order to allow linking with C object files.
2010-02-06Automatically enable hipe for darwin/amd64 buildsGeoff Cant
2010-02-06Allow configure to enable_hipe for darwin/amd64 buildsGeoff Cant
2010-02-06Teach configure --enable-m32-build for forcing a 32-bit buildPatrik Nyblom
2010-02-05Fixed erroneous assertion.Rickard Green
2010-02-04Fixed an erroneous assertion.Rickard Green
2010-02-03OTP-8323 Cross compilation improvements and other build systemRickard Green
improvements. Most notable: Lots of cross compilation improvements. The old cross compilation support was more or less non-existing as well as broken. Please, note that the cross compilation support should still be considered as experimental. Also note that old cross compilation configurations cannot be used without modifications. For more information on cross compiling Erlang/OTP see the $ERL_TOP/xcomp/README file. Support for staged install using <url href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed. For more information see the $ERL_TOP/README file. Documentation of the release target of the top Makefile. For more information see the $ERL_TOP/README file. make install now by default creates relative symbolic links instead of absolute ones. For more information see the $ERL_TOP/README file. $ERL_TOP/configure --help=recursive now works and prints help for all applications with configure scripts. Doing make install, or make release directly after make all no longer triggers miscellaneous rebuilds. Existing bootstrap system is now used when doing make install, or make release without a preceding make all. The crypto and ssl applications use the same runtime library path when dynamically linking against libssl.so and libcrypto.so. The runtime library search path has also been extended. The configure scripts of erl_interface and odbc now search for thread libraries and thread library quirks the same way as erts do. The configure script of the odbc application now also looks for odbc libraries in lib64 and lib/64 directories when building on a 64-bit system. The config.h.in file in the erl_interface application is now automatically generated in instead of statically updated which reduces the risk of configure tests without any effect.
2010-02-03Merge branch 'jb/atom-table-size' into ccase/r13b04_devErlang/OTP
* jb/atom-table-size: Add the +t emulator option to change the maximum number of atoms OTP-8405 There is a new +t emulator option for changing the maximum number of atoms. (Thanks to Julien Barbot.)
2010-02-03OTP-8386 Immediately repeated multi-scheduling block/unblock cycles usingRickard Green
erlang:system_flag(multi_scheduling, block | unblock) could deadlock the runtime system.
2010-02-02Add the +t emulator option to change the maximum number of atomsJulien Barbot
It is now possible to increase or decrease the maximum number of atoms the VM can handle. The default value is 1048576 (1024*1024).
2010-01-31hipe_mfait_lock needs to be below proc_main.Rickard Green
2010-01-30Merge branch 'mp/hipe-smp-fixes' into ccase/r13b04_devErlang/OTP
* mp/hipe-smp-fixes: work around hipe_mfa_info_table lock omission fix hipe loader SMP non-atomicity error OTP-8397 The loading of native code was not properly atomic in the SMP emulator, which could cause crashes. Also a per-MFA information table for the native code has now been protected with a lock since it turns that it could be accessed concurrently in the SMP emulator. (Thanks to Mikael Pettersson.)
2010-01-27work around hipe_mfa_info_table lock omissionMikael Pettersson
HiPE maintains per-MFA information such as native code entry point in a table. This table was thought to be read-only at runtime, except when the loader populates it, so it employed no locking. That turned out to be incorrect: if there is an apply of a previously unseen MFA, a native code stub for that MFA is created and recorded in the table, causing it to grow. Work around this for now by slapping a mutex around accesses to that table. Signed-off-by: Mikael Pettersson <[email protected]>
2010-01-27Update preloaded filesBjörn Gustavsson
2010-01-27Merge branch 'rb/stdlib_re_unicode_fixes' into ccase/r13b04_devErlang/OTP
* rb/stdlib_re_unicode_fixes: Fix lost unicode option in re:compile() Refactor out repeated block in re module Fix re:replace/4 to handle unicode charlist Replacement argument Fix re:replace/4 to handle unicode charlist RE argument Fix re:replace/4 to handle binary unicode output when nothing replaced OTP-8394 A number of bugs concerning re and unicode are corrected: - re:compile no longer loses unicode option, which also fixes bug in re:split. - re:replace now handles unicode charlist replacement argument - re:replace now handles unicode RE charlist argument correctly - re:replace now handles binary unicode output correctly when nothing is replaced. Most code, testcases and error isolation done by Rory Byrne.
2010-01-27Fix re:replace/4 to handle unicode charlist RE argumentPatrik Nyblom
The real problem is in the re:run/3 BIF. Noticed-by: Rory Byrne Tests-by: Rory Byrne
2010-01-27OTP-8387 Explicit top directories in archive files are now optional.Håkan Mattsson
For example, if an archive (app-vsn.ez) just contains an app-vsn/ebin/mod.beam file, the file info for the app-vsn and app-vsn/ebin directories are faked using the file info from the archive file as origin. The virtual direcories can also be listed. For short, the top directories are virtual if they does not exist.
2010-01-26OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2010-01-25Test that "extra" is handled according to specs in ALIVE2_REQ and PORT2_RESPKlas Johansson
2010-01-25Merge branch 'ta/os_timestamp_no_mutex' into ccase/r13b04_devErlang/OTP
* ta/os_timestamp_no_mutex: Remove mutex lock around sys_gettimeofday() in os:timestamp/0 OTP-8390 An unecessary lock operation in os:timestamp/0 has been eliminated, making it slightly more efficient. (Thanks to Jonas Falkevik and Tuncer Ayaz.)
2010-01-25OTP-8377 ETS bug causing the memory counter from ets:info forSverker Eriksson
ordered_set's to sometimes get out of synch and absurdly high.
2010-01-23Remove mutex lock around sys_gettimeofday() in os:timestamp/0Tuncer Ayaz
In the erlang-questions thread "os:timestamp() uses mutex lock" Jonas Falkevik questioned the need for a mutex lock in os:timestamp/0. The mutex lock *is* needed in erlang:now() to guarantee the uniqueness of the returned time, but serves no useful purpose in os:timestamp(). Signed-off-by: Tuncer Ayaz <[email protected]>
2010-01-22OTP-8386 Immediately repeated multi-scheduling block/unblock cycles usingRickard Green
erlang:system_flag(multi_scheduling, block | unblock) could deadlock the runtime system.
2010-01-22Merge branch 'bg/avoid-etop-in-include' into ccase/r13b04_devErlang/OTP
* bg/avoid-etop-in-include: epmd tests: fix build of test suites on Windows system test: fix build of test suites on Windows
2010-01-20epmd tests: fix build of test suites on WindowsBjörn Gustavsson
On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emulator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by creating an Emakefile and let ts:run() take care of the build (ts:run() will set up the include path so that test_server.hrl can be found).
2010-01-20OTP-8375 A bug causing memory corruption in re:run() has been corrected.Patrik Nyblom
(Thanks to Yamashina Hio.)
2010-01-20system test: fix build of test suites on WindowsBjörn Gustavsson
On Windows, the ERL_TOP environment variable contains a path that only is valid for cygwin-enabled programs, such as 'make'. It is not meaningful to pass the value of $ERL_TOP in the -I option to the Erlang compiler, because the Erlang emulator does not interpret cygwin paths correctly. Therefore, -include("test_server.hrl") will fail to find test_server.hrl. Work around the problem by using -include_lib().
2010-01-20Merge branch 'cf/compile_warning_as_error' into ccase/r13b04_devErlang/OTP
* cf/compile_warning_as_error: Add option -Werror in erlc(1) compile: add flag warnings_as_errors to treat warnings as errors compile.erl: remove trailing whitespace OTP-8382 The -Werror option for erlc and the compiler option warnings_as_errors will cause warnings to be treated as errors. (Thanks to Christopher Faulet.)
2010-01-19Add option -Werror in erlc(1)Christopher Faulet
Like in gcc, this option treats warnings as errors.
2010-01-19OTP-8373 ERTS makefiles used to detect the use of a gcc C compiler byRickard Green
checking if CC equaled gcc. That is, the makefiles failed to detect gcc C compilers with other command line names than gcc. `configure' now substitute GCC into the makefiles. If CC is a gcc C compiler, GCC will have the value yes. (Thanks to Jean-S�bastien P�dron)
2010-01-19OTP-8342 Processes, and/or ports could get stuck on a blocked schedulerRickard Green
when erlang:system_flag(multi_scheduling, block) was used. Processes, and/or ports could get stuck on an offline scheduler when schedulers online were reduced using erlang:system_flag(schedulers_online, SchedulersOnline).
2010-01-19Merge branch 'bg/compiler-beam_validator' into ccase/r13b04_devErlang/OTP
* bg/compiler-beam_validator: beam_validator: fix incorrect assumptions about GC guard BIFs OTP-8378 In rare circumstances when using garbaging collecting guard BIFs, the validation pass (beam_validator) would signal that the code was unsafe, when it in fact was correct. (Thanks to Kiran Khaladkar.)
2010-01-18Fix annoying failing statistics_SUITE test casesBjörn Gustavsson
In an SMP emulator, two of the test cases in statistics_SUITE frequently fail. Remove the runtime_zero_update/1 test case, because you can't really expect an SMP emulator not to spend any CPU time at all even if no Erlang process is active. Adjust the runtime_update/1 test case to not fail if the measured times are note close enough. It will still fail if statistics(runtime) would fail or return the wrong type.
2010-01-15Merge branch 'egil/binary-gc' into ccase/r13b04_devErlang/OTP
* egil/binary-gc: Add documentation for binary heap size settings. Add tracing capabilities for binary virtual heap Add min heap size start options to beam and erl Improve binary garbage collection OTP-8370 The default settings for garbage collection of binaries has been adjusted to be less aggressive than in R13B03. It is now also possible configure the settings for binary GC. See the documentation for spawn_opt/2-5, erlang:system_info/1, erlang:system_flag/2, process_flag/2-3, erlang:trace/3, and the documenation for erl for the new command line options +hms and +hmbs.
2010-01-15beam_validator: fix incorrect assumptions about GC guard BIFsBjörn Gustavsson
The beam_validator pass incorrectly assumes that a GC guard BIF (such as length/1) may first do a garbage collection and then fail. That assumption is not correct (guards BIF only do garbage collection when it is known that the BIF call will succeed), and will cause the compiler to reject valid programs. Modify the beam_validator to assume that if the branch is taken for a gc_bif instruction, all registers are unchanged and no garbage collection has occurred. Also add a comment in the emulator about that assumption.