aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2018-03-21Merge pull request #1740 from rickard-green/rickard/signals/OTP-14589Rickard Green
Implementation of true asynchronous signaling between processes
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
Communication between Erlang processes has conceptually always been performed through asynchronous signaling. The runtime system implementation has however previously preformed most operation synchronously. In a system with only one true thread of execution, this is not problematic (often the opposite). In a system with multiple threads of execution (as current runtime system implementation with SMP support) it becomes problematic. This since it often involves locking of structures when updating them which in turn cause resource contention. Utilizing true asynchronous communication often avoids these resource contention issues. The case that triggered this change was contention on the link lock due to frequent updates of the monitor trees during communication with a frequently used server. The signal order delivery guarantees of the language makes it hard to change the implementation of only some signals to use true asynchronous signaling. Therefore the implementations of (almost) all signals have been changed. Currently the following signals have been implemented as true asynchronous signals: - Message signals - Exit signals - Monitor signals - Demonitor signals - Monitor triggered signals (DOWN, CHANGE, etc) - Link signals - Unlink signals - Group leader signals All of the above already defined as asynchronous signals in the language. The implementation of messages signals was quite asynchronous to begin with, but had quite strict delivery constraints due to the ordering guarantees of signals between a pair of processes. The previously used message queue partitioned into two halves has been replaced by a more general signal queue partitioned into three parts that service all kinds of signals. More details regarding the signal queue can be found in comments in the erl_proc_sig_queue.h file. The monitor and link implementations have also been completely replaced in order to fit the new asynchronous signaling implementation as good as possible. More details regarding the new monitor and link implementations can be found in the erl_monitor_link.h file.
2018-03-20Merge pull request #1744 from uabboli/hasse/stdlib/lists_search/OTP-14675Hans Bolinder
stdlib: Add function lists:search/2
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-14Merge branch 'maint'Henrik
Conflicts: OTP_VERSION
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson
2018-03-13Merge pull request #1743 from richcarl/io-format-multiple-modifiersHans Bolinder
Allow multiple modifier characters in io:format control sequences OTP-14971
2018-03-12Allow multiple modifier characters in io:format control sequencesRichard Carlsson
This makes it possible to print unicode atoms at the same time as suppressing detection of printable lists.
2018-03-10make erlang:process_info/1 not retrieve messagesMikael Pettersson
process_info/1 retrieves a number of properties related to a process, including the list of messages in its mailbox. This is potentially unsafe if the target process has a large number of queued messages: - there is no a priori upper bound on the amount of memory being allocated to hold that list, and - the loop to retrieve the messages is uninterruptible, so the Erlang scheduler where this executes blocks for the duration We've seen process_info/1 bring down heavily loaded nodes on more than one occasion. At least once it appeared to have blocked the Erlang heart process from executing, causing the external heart to kill the VM. Consequently this removes 'messages' from the list of process_info tags to retrieve for process_info/1. Note that process_info/1 still retrieves 'message_queue_len', and process_info/2 can still retrieve 'messages' when asked to. A few places in the OTP libraries need minor adjustments, since they want 'message_queue_len' but compute it from the length of the list of messages.
2018-03-09stdlib: Add function lists:search/2Hans Bolinder
This is essentially PR 102, https://github.com/erlang/otp/pull/102. The OTP Technical Board decided to change the name of the function to search/2.
2018-03-09Update release notesErlang/OTP
2018-03-09Update version numbersErlang/OTP
2018-03-09Merge pull request #1735 from richcarl/io_lib-unscan-fixHans Bolinder
Make io_lib:unscan_format/1 work with pad char and default precision OTP-14958
2018-03-08stdlib: Improve io_lib:limit_term/2Hans Bolinder
Improve handling of maps. Addendum to b57e890.
2018-03-08Merge pull request #1737 from richcarl/io-format-printable-strings-docHans Bolinder
Improve documentation of io:format ~p when Unicode is involved
2018-03-08Improve documentation of io:format ~p when Unicode is involvedRichard Carlsson
2018-03-05stdlib: Fix receive-ref optimization for gen_server:callSverker Eriksson
Optimization does not trigger for try-catch. But send cannot fail here anyway, as Process cannot be an atom.
2018-03-02kernel,stdlib: Remove obsolete use of send with 'noconnect'Sverker Eriksson
as workarounds to avoid blocking auto-connect, which is now asynchronous in OTP-21. Also changed old catch to more efficient try-catch.
2018-03-02stdlib: Remove obsolete use of monitor_nodeSverker Eriksson
as fallback when erlang:monitor failed toward primitive nodes, which it does not do in OTP-21.
2018-03-02Merge pull request #1734 from wojtekmach/wm-erl-tar-docs-typoLukas Larsson
Fix typo in erl_tar:format_error/1 docs
2018-03-02Make io_lib:unscan_format/1 work with pad char and default precisionRichard Carlsson
2018-03-02Merge branch 'maint'Lukas Larsson
2018-03-02Merge branch 'lukas/kernel/fix_os_cmd_max_size_win32/OTP-14940' into maintLukas Larsson
* lukas/kernel/fix_os_cmd_max_size_win32/OTP-14940: stdlib: Fix doc link in timer kernel: Fix handling of os:cmd option max_size in win
2018-03-01Fix typo in erl_tar:format_error/1 docsWojtek Mach
2018-03-01Merge branch 'maint'Dan Gudmundsson
* maint: ERL-558 Add the missing function clause for string:prefix (#1702)
2018-03-01ERL-558 Add the missing function clause for string:prefix (#1702)Seyed Mirsadeghi
OTP-14942
2018-03-01stdlib: Fix doc link in timerLukas Larsson
2018-02-28Merge branch 'peterdmv/stdlib/improve_uri_string_api/OTP-14910'Péter Dimitrov
* peterdmv/stdlib/improve_uri_string_api/OTP-14910: stdlib: Update uri_string documentation (HTML 5.2) stdlib: Improve URI normalization in uri_string Change-Id: I1b85e125ae3bc64e04b04ab884ca603217123167
2018-02-28Merge branch 'john/erts/binary-bin_to_list-performance-fix/OTP-14741'John Högberg
* john/erts/binary-bin_to_list-performance-fix/OTP-14741: Replace binary:bin_to_list CIF implementation with binary_to_list
2018-02-28Merge branch 'maint'John Högberg
* maint: Skip testing unavailable interfaces in inet_SUITE:getifaddrs Make re_SUITE:sub_binaries less unstable
2018-02-27Make re_SUITE:sub_binaries less unstableJohn Högberg
The small sub-binary conversion trick in the GC broke this test pretty often on some machines.
2018-02-26Replace binary:bin_to_list CIF implementation with binary_to_listJohn Högberg
binary:bin_to_list had a poor implementation that resulted in excessive garbage collection. binary_to_list is almost identical and has a generally better implementation, so I've replaced binary:bin_to_list's CIF with a thin wrapper around binary_to_list. Granted, binary_to_list has a deprecated indexing scheme, but we're unlikely to ever remote it entirely and it's somewhat easy to move it to the 'binary' module later on.
2018-02-26Merge pull request #1719 from josevalim/jv-faster-dialyzer-md5Hans Bolinder
dialyzer: Compute MD5s using the .beam file (OTP-14937)
2018-02-23Merge pull request #1723 from jhogberg/john/erts/ets-whereis/OTP-14884John Högberg
Add ets:whereis/1 for resolving table names -> tid()
2018-02-23Merge branch 'maint'Hans Bolinder
* maint: stdlib: Correct a minor epp bug
2018-02-22Merge branch 'raimo/stdlib/rand-polish-stat-tests'Raimo Niskanen
* raimo/stdlib/rand-polish-stat-tests: Decrease tolerance a wee bit Repeat stat tests to only fail for systematic errors Fix histogram and outlier checks
2018-02-22Clarify the named_table option to ets:new/2John Högberg
2018-02-22Add ets:whereis/1 for resolving table names -> tid()John Högberg
2018-02-21Fix spec for beam_lib:all_chunks/1José Valim
2018-02-21stdlib: Correct a minor epp bugHans Bolinder
The bug was introduced in 87a0af4 (R18).
2018-02-21Decrease tolerance a wee bitRaimo Niskanen
2018-02-21Repeat stat tests to only fail for systematic errorsRaimo Niskanen
2018-02-19Merge branch 'maint'Lukas Larsson
2018-02-19stdlib: Correct documentation typoMartin Hässler
2018-02-13stdlib: Update uri_string documentation (HTML 5.2)Péter Dimitrov
- Original link to HTML 5.0 specification was broken as the document was moved when later revisions were released. - Form-urlencoded query string handling conforms to the HTML 5.2 specification that references WHATWG URL (10 Jan 2018). - HTML 5.2 does not specify handling of non-UTF-8 form-urlencoded query strings, but it is still supported as described in HTML 5.0. Change-Id: I44603bb501530b16651ecbb9a26ea64e119f83d9
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-08stdlib: Improve URI normalization in uri_stringPéter Dimitrov
- normalize/1 accepts uri_map() as input type and can return error() if URI parsing fails. - Added normalize/2 that can return a normalized uri_map(). Change-Id: Icdd2e60c15019d3eec2e7bc994cae03066a79194
2018-02-07Merge branch 'hasse/no_get_stacktrace/OTP-14861'Hans Bolinder
* hasse/no_get_stacktrace/OTP-14861: erts: Update abstract format doc with stacktrace variable wx: Do not call erlang:get_stacktrace() tools: Do not call erlang:get_stacktrace() stdlib: Do not call erlang:get_stacktrace() sasl: Do not call erlang:get_stacktrace() runtime_tools: Do not call erlang:get_stacktrace() reltool: Do not call erlang:get_stacktrace() parsetools: Do not call erlang:get_stacktrace() observer: Do not call erlang:get_stacktrace() mnesia: Do not call erlang:get_stacktrace() (cont) mnesia: Do not call erlang:get_stacktrace() kernel: Do not call erlang:get_stacktrace() inets: Do not call erlang:get_stacktrace() eunit: Do not call erlang:get_stacktrace() et: Do not call erlang:get_stacktrace() dialyzer: Do not call erlang:get_stacktrace() debugger: Do not call erlang:get_stacktrace() debugger: Do not try to restore stacktrace common_test: Do not call erlang:get_stacktrace()