aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2011-11-17erts: Default enable SCTP in configureRaimo Niskanen
2011-11-17Update primary bootstrap and preloaded filesRaimo Niskanen
2011-11-17erts: Use SCTP functions in default libsRaimo Niskanen
On e.g FreeBSD the functions sctp_bindx() and sctp_peeloff() do not require any extra linkage library flags and there is no dynamic lib to load for them; use configure to find them.
2011-11-17erts: Improve SCTP message defragmentingRaimo Niskanen
Receive several fragments within the same receive loop if possible.
2011-11-17erts,kernel: Bugfix - collect fragmented SCTP messages on recvRaimo Niskanen
2011-11-17erts,kernel: Implement gen_sctp:peeloff/2Raimo Niskanen
2011-11-17erts,kernel: Add type stream sockets to SCTPRaimo Niskanen
2011-11-16erts,kernel: Rename operations common to TCP and SCTPRaimo Niskanen
2011-11-15Merge branch 'bjorn/erts/erlc-do-not-bind'Björn Gustavsson
* bjorn/erts/erlc-do-not-bind: erlc: Do not bind schedulers when invoking "erl"
2011-11-14erlc: Do not bind schedulers when invoking "erl"Björn Gustavsson
If parallel make is used, several instance of 'erlc' is likely to be invoked at once. Therefore, the default binding of schedulers to CPU cores will do no good. (With this change, the build of Erlang/OTP with six threads finished in about 7 minutes; without in about 11 minutes.)
2011-11-14Merge branch 'egil/reallocating-catches/OTP-9692'Björn-Egil Dahlberg
* egil/reallocating-catches/OTP-9692: erts: Teach VM to reallocate beam catch table
2011-11-13Merge branch 'rickard/bad-rwmtx-assert'Rickard Green
* rickard/bad-rwmtx-assert: Fix bad assertion in rwmtx implementation
2011-11-13Merge branch 'rickard/multi-exit-bug/OTP-9705'Rickard Green
* rickard/multi-exit-bug/OTP-9705: Make sure only one thread exits the runtime system
2011-11-13Merge branch 'rickard/win-cs-mutex/OTP-9671'Rickard Green
* rickard/win-cs-mutex/OTP-9671: Use critical sections as mutex implementation on Windows
2011-11-13Merge branch 'rickard/generic-thr-queue/OTP-9632'Rickard Green
* rickard/generic-thr-queue/OTP-9632: Use generic lock-free queue for async threads Use generic lock-free queue for misc aux work Implement generic lock-free queue
2011-11-13Merge branch 'rickard/thr-progress-block/OTP-9631'Rickard Green
* rickard/thr-progress-block/OTP-9631: Replace system block with thread progress block
2011-11-13Merge branch 'rickard/alloc-opt/OTP-7775'Rickard Green
* rickard/alloc-opt/OTP-7775: Optimize memory allocation Conflicts: erts/aclocal.m4 erts/emulator/hipe/hipe_bif_list.m4 erts/preloaded/ebin/erl_prim_loader.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/init.beam erts/preloaded/ebin/otp_ring0.beam erts/preloaded/ebin/prim_file.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/ebin/prim_zip.beam erts/preloaded/ebin/zlib.beam
2011-11-13Make sure only one thread exits the runtime systemRickard Green
The runtime system crashed if more than one thread tried to exit the runtime system at the same time.
2011-11-13Use critical sections as mutex implementation on WindowsRickard Green
Windows native critical sections are now used internally in the runtime system as mutex implementation. This since they perform better under extreme contention than our own implementation.
2011-11-13Use generic lock-free queue for async threadsRickard Green
Queues used for communication between async threads and scheduler threads have been replaced with lock-free queues. Drivers using the driver_async functionality are not automatically locked to the system anymore, and can be unloaded as any dynamically linked in driver. Scheduling of ready async jobs is now also interleaved in between other jobs. Previously all ready async jobs was performed at once.
2011-11-13Use generic lock-free queue for misc aux workRickard Green
2011-11-13Implement generic lock-free queueRickard Green
The implementation of an ERTS internal, generic, many to one, lock-free queue for communication between threads. The many to one scenario is very common in ERTS, so it can be used in a lot of places in the future. Changing to this queue from a lock based queue, however, often requires some redesigning. This since we have often used the lock of the queue to protect other information too.
2011-11-13Replace system block with thread progress blockRickard Green
The ERTS internal system block functionality has been replaced by new functionality for blocking the system. The old system block functionality had contention issues and complexity issues. The new functionality piggy-backs on thread progress tracking functionality needed by newly introduced lock-free synchronization in the runtime system. When the functionality for blocking the system isn't used there is more or less no overhead at all. This since the functionality for tracking thread progress is there and needed anyway.
2011-11-13Optimize memory allocationRickard Green
A number of memory allocation optimizations have been implemented. Most optimizations reduce contention caused by synchronization between threads during allocation and deallocation of memory. Most notably: * Synchronization of memory management in scheduler specific allocator instances has been rewritten to use lock-free synchronization. * Synchronization of memory management in scheduler specific pre-allocators has been rewritten to use lock-free synchronization. * The 'mseg_alloc' memory segment allocator now use scheduler specific instances instead of one instance. Apart from reducing contention this also ensures that memory allocators always create memory segments on the local NUMA node on a NUMA system.
2011-11-11Fix bad assertion in rwmtx implementationRickard Green
2011-11-10erts: Teach VM to reallocate beam catch tableBjörn-Egil Dahlberg
Previously this table were statically allocated to 16*1024 entries. Now the default size is 1024 entries but that is doubled each time the limit is reached. Theoretical upper limit is 2^26 entries (the remaining bits on a catch datatype) in a 32 bit system.
2011-11-10Merge branch 'rj/fix-remove-exec-bit'Henrik Nord
* rj/fix-remove-exec-bit: Remove exec bit from files: info files, dat, bat Remove exec bit from files related to: XML, make, C Remove exec bit from: erl, hrl, xml, html, asn, gif, xpm OTP-9698
2011-11-10Merge branch 'rj/fix-erlang-doc-style'Henrik Nord
* rj/fix-erlang-doc-style: Fixes module erlang doc style: option description OTP-9697
2011-11-10Remove exec bit from files related to: XML, make, CRicardo Catalinas Jiménez
2011-11-10Remove exec bit from: erl, hrl, xml, html, asn, gif, xpmRicardo Catalinas Jiménez
2011-11-09Merge branch 'sverk/bif-args/OTP-9662'Sverker Eriksson
* sverk/bif-args/OTP-9662: erts,hipe: Limited support for hipe cross compilation erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator erts-hipe: Enable debug compiled hipe-VM with lock checker erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0 erts-hipe: Deliberate leak of native fun entries erts-hipe: Fix new trap conventions for x86, amd64 and ppc Store the trap address in p->i Store the trap arguments in the X register array erts-hipe: Make some primops use new BIF calling convention erts-hipe: Adapt generated BIF wrappers for new calling convention erts-hipe: Remove obscuring macros in generated assembler code erts-hipe: Make hipe enabled emulator compile with new BIF calls Simplify the instructions for calling BIFs Change the calling convention for BIFs Use the proper macros in all BIFs Conflicts: erts/emulator/beam/bif.h erts/emulator/beam/erl_bif_info.c
2011-11-09erts,hipe: Limited support for hipe cross compilationSverker Eriksson
Normally hipe assumes that generated native code will be executed on the same emulator as the hipe compiler is running on. This commit allows you to build a hipe "cross-compiler" for a different configured emulator (but for same architecture). Example: > cd lib/hipe > make clean > make XCOMP=yes FLAVOR=smp TYPE=debug This hipe compiler will generate code to be executed on the debug compiled smp-emulator at $ERL_TOP.
2011-11-09Merge branch 'sverk/enif_inspect-memleak/OTP-9668'Sverker Eriksson
* sverk/enif_inspect-memleak/OTP-9668: erts: Fix memory leak of enif_inspect_* on independent environment
2011-11-08Merge branch 'bjorn/create-less-garbage'Björn Gustavsson
* bjorn/create-less-garbage: Optimize filename:basename/1 to produce less garbage Optimize filename:extension/1 to produce less garbage sys.c for Unix: Undo caching of utsname in os_flavor() Pre-build the tuples returned by os:type/0 and os:version/0
2011-11-07Merge branch 'egil/fix-compiler-warnings'Björn-Egil Dahlberg
* egil/fix-compiler-warnings: erts: Remove unused variable in enif_make_binary erts: Remove debug variable in list_to_binary erts: Remove cp on exiting and trapping processes erts: Remove debug variables in erl_db erts: Remove dead code in efile_drv erts: Remove lock_check debug variables erts: Remove unused variable in ttsl_drv erts: "initialized" is only used with CHLDWTHR erts: remove debug variables in beam_bp
2011-11-07Merge branch 'ta/nif-variadic-funs'Henrik Nord
OTP-9675
2011-11-07erts: Remove unused variable in enif_make_binaryBjörn-Egil Dahlberg
2011-11-07erts: Remove debug variable in list_to_binaryBjörn-Egil Dahlberg
2011-11-07erts: Remove cp on exiting and trapping processesBjörn-Egil Dahlberg
2011-11-07erts: Remove debug variables in erl_dbBjörn-Egil Dahlberg
2011-11-07erts: Remove dead code in efile_drvBjörn-Egil Dahlberg
2011-11-07erts: Remove lock_check debug variablesBjörn-Egil Dahlberg
2011-11-07erts: Remove unused variable in ttsl_drvBjörn-Egil Dahlberg
2011-11-07erts: "initialized" is only used with CHLDWTHRBjörn-Egil Dahlberg
2011-11-07erts: remove debug variables in beam_bpBjörn-Egil Dahlberg
2011-11-07Merge branch 'bjorn/fun-improvements/OTP-9667'Björn Gustavsson
* bjorn/fun-improvements/OTP-9667: sys_pre_expand: Remove incorrect comment compiler: Eliminate use of deprecated erlang:hash/2 beam_asm: Fix broken NewIndex in fun entries beam_asm: Strenghten the calculation of Uniq for funs
2011-11-07beam_asm: Strenghten the calculation of Uniq for funsBjörn Gustavsson
Funs are identified by a triple, <Module,Uniq,Index>, where Module is the module name, Uniq is a 27 bit hash value of some intermediate representation of the code for the fun, and index is a small integer. When a fun is loaded, the triple for the fun will be compared to previously loaded funs. If all elements in the triple in the newly loaded fun are the same, the newly loaded fun will replace the previous fun. The idea is that if Uniq are the same, the code for the fun is also the same. The problem is that Uniq is only based on the intermediate representation of the fun itself. If the fun calls local functions in the same module, Uniq may remain the same even if the behavior of the fun has been changed. See http://erlang.org/pipermail/erlang-bugs/2007-June/000368.htlm for an example. As a long-term plan to fix this problem, the NewIndex and NewUniq fields was added to each fun in the R8 release (where NewUniq is the MD5 of the BEAM code for the module). Unfortunately, it turns out that the compiler does not assign unique value to NewIndex (if it isn't tested, it doesn't work), so we cannot use the <Module,NewUniq,NewIndex> triple as identification. It would be possible to use <Module,NewUniq,Index>, but that seems ugly. Therefore, fix the problem by making Uniq more unique by taking 27 bits from the MD5 for the BEAM code. That only requires a change to the compiler. Also update a test case for cover, which now fails because of the stronger Uniq calculation. (The comment in test case about why the Pid2 process survived is not correct.)
2011-11-07EEP-23: Allow variables in fun M:F/ABjörn Gustavsson
Currently, the external fun syntax "fun M:F/A" only supports literals. That is, "fun lists:reverse/1" is allowed but not "fun M:F/A". In many real-life situations, some or all of M, F, A are not known until run-time, and one is forced to either use the undocumented erlang:make_fun/3 BIF or to use a "tuple fun" (which is deprecated). EEP-23 suggests that the parser (erl_parse) should immediately transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have not followed that approach in this implementation, because we want the abstract code to mirror the source code as closely as possible, and we also consider erlang:make_fun/3 to be an implementation detail that we might want to remove in the future. Instead, we will change the abstract format for "fun M:F/A" (in a way that is not backwards compatible), and while we are at it, we will move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)" from sys_pre_expand down to the v3_core pass. We will also update the debugger and xref to use the new format. We did consider making the abstract format backward compatible if no variables were used in the fun, but decided against it. Keeping it backward compatible would mean that there would be different abstract formats for the no-variable and variable case, and tools would have to handle both formats, probably forever. Reference: http://www.erlang.org/eeps/eep-0023.html
2011-11-02beam_loader: Support external funs in the literal poolBjörn Gustavsson
A future release of the compiler might want to treat external funs as literals. Make sure that the loader can cope with an export entry being created from both an entry in the literal pool and from the export table (i.e. if an external fun refers to an exported function in the same module).
2011-11-02beam_load.c: Clarify error message when loading unsupported BEAM filesBjörn Gustavsson
Make it clear for the user what has happened and how to fix it when an attempt is made to load a BEAM file containing new instructions that the current run-time system cannot handle. Suggested-by: Thomas Lindgren