aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
AgeCommit message (Collapse)Author
2018-03-23Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix VM probes compilation Fix lock counting Fix signal order for is_process_alive Fix signal handling priority elevation
2018-03-23Merge branch 'john/erts/list-installed-nifs/OTP-14965'John Högberg
* john/erts/list-installed-nifs/OTP-14965: Add an option to ?MODULE:module_info/1 for listing NIFs Fix a misleading comment
2018-03-22Fix signal order for is_process_aliveRickard Green
2018-03-22Merge branch 'bjorn/erts/eliminate-get_stacktrace'Björn Gustavsson
* bjorn/erts/eliminate-get_stacktrace: Eliminate use of erlang:get_stacktrace/0 in preloaded modules
2018-03-21Add an option to ?MODULE:module_info/1 for listing NIFsJohn Högberg
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-21Eliminate use of erlang:get_stacktrace/0 in preloaded modulesBjörn Gustavsson
2018-03-19Fix file:change_group/change_ownerJohn Högberg
It wasn't possible to change group/owner separately, and our test suite lacked coverage for that. ERL-589
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson
2018-03-02erts,kernel: Add dist_util:strict_order_flags/0Sverker Eriksson
to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency.
2018-03-02erts,kernel: Add erts_internal:get_dflags/0Sverker Eriksson
for kernel to ask erts about distribution flags and keep this info in one place.
2018-03-02erts: Cleanup erlang:system_info docsLukas Larsson
Attempt to make the system_info docs easier to navigate by grouping items of similar themes together in the documentation.
2018-02-20Merge branch 'maint'Sverker Eriksson
2018-02-15kernel: Reject load of module names with slashSverker Eriksson
or backslash on Windows. Purpose: Prevent tricks to get hostile code running.
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-12Merge 'sverker/carrier-migration-improvements'Sverker Eriksson
into 'sverker/maint-19/alloc-n-migration/ERIERL-88'
2018-02-12erts: Add system_flags(erts_alloc,"+M?sbct *")Sverker Eriksson
to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility.
2018-02-02Reword docs related to the runtime system modeXavier Noria
The existing wording may be interpreted as saying that embedded mode eager loads all modules. This revision makes clear embedded mode only disables module auto loading. Since I was on it, I have reordered a couple of places to describe interactive first, and then embedded. It feels natural to cover first the default and positive mode (auto loads), and then its negation.
2018-01-15Merge branch 'maint'Sverker Eriksson
2018-01-09erts: Fix term_to_binary/2 specSverker Eriksson
2017-12-20erts: Add more stats for mbcs_poolSverker Eriksson
similar to the ones in OTP-19.2.3.1
2017-12-19Merge branch 'dgud/kernel/refc_sched_wall_time/OTP-11694'Dan Gudmundsson
* dgud/kernel/refc_sched_wall_time/OTP-11694: test: spawn scheduler_wall_time flag holder Turn on scheduler_wall_time in an alive process Redirect system_flag(scheduler_wall_time,_) to kernel_refc kernel: add a resource reference counter
2017-12-19Redirect system_flag(scheduler_wall_time,_) to kernel_refcRickard Green
2017-11-30Reimplement efile_drv as a dirty NIFJohn Högberg
This improves the latency of file operations as dirty schedulers are a bit more eager to run jobs than async threads, and use a single global queue rather than per-thread queues, eliminating the risk of a job stalling behind a long-running job on the same thread while other async threads sit idle. There's no such thing as a free lunch though; the lowered latency comes at the cost of increased busy-waiting which may have an adverse effect on some applications. This behavior can be tweaked with the +sbwt flag, but unfortunately it affects all types of schedulers and not just dirty ones. We plan to add type-specific flags at a later stage. sendfile has been moved to inet_drv to lessen the effect of a nasty race; the cooperation between inet_drv and efile has never been airtight and the socket dying at the wrong time (Regardless of reason) could result in fd aliasing. Moving it to the inet driver makes it impossible to trigger this by closing the socket in the middle of a sendfile operation, while still allowing it to be aborted -- something that can't be done if it stays in the file driver. The race still occurs if the controlling process dies in the short window between dispatching the sendfile operation and the dup(2) call in the driver, but it's much less likely to happen now. A proper fix is in the works. -- Notable functional differences: * The use_threads option for file:sendfile/5 no longer has any effect. * The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling. -- OTP-14256
2017-11-30Add a mutable binary buffer type (prim_buffer)John Högberg
2017-11-20Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'Lukas Larsson
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
2017-11-20Update preloaded modulesLukas Larsson
2017-11-20erts: Remove erts_internal:maps_to_list/2Lukas Larsson
This function is no longer needed as maps:iterator has now been implemented.
2017-11-20erts: Implement batching maps:iteratorLukas Larsson
This iterator implementation fetches multiple elements to iterate over in one call to erts_internal:maps_next instead of one at a time. This means that the memory usage will go up for the iterator as we are buffering elements, but the usage is still bounded. In this implementation the max memory usage is 1000 words. Using this approach makes the iterator as fast as using maps:to_list, so maps:iterator/2 has been removed.
2017-11-15Move new|abort_connection_id to erts_internalSverker Eriksson
and drop _id suffix.
2017-11-15Cleanup net_kernelSverker Eriksson
2017-11-15fix erlang specs and preloadedSverker Eriksson
2017-11-15Remove obsolete erlang:dgroup_leaderSverker Eriksson
2017-11-15Remove obsolete erlang:dexit/2Sverker Eriksson
2017-11-15Remove obsolete erlang:dlink/1, dunlink/1 and dist_exit/3Sverker Eriksson
2017-11-15Remove obsolete erlang:dsendSverker Eriksson
2017-11-15erts: Async auto-connect for monitor/2Sverker Eriksson
2017-11-15erts: Async auto-connect for monitor_nodeSverker Eriksson
Removed distribution_SUITE:applied_monitor_node as it seems to test apply of trapping BIF and monitor_node does not trap anymore.
2017-11-15erts: Introduce asynchronous auto-connectSverker Eriksson
2017-11-15Merge PR-1605 from sverker/sverker/binary_to_term-used OTP-14780Sverker Eriksson
Add 'used' option for binary_to_term/2
2017-11-10Merge branch 'maint'Ingela Anderton Andin
* maint: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Conflicts: OTP_VERSION
2017-11-09Fix deflateParams on zlib 1.2.11John Högberg
1.2.11 started bailing when avail_out==0 regardless of whether there's anything to flush or not, and there's no point in adapting the old method since it was vulnerable to bugs in other zlib versions which updated the deflate parameters even on failure. The api_deflateParams test has been expanded accordingly, and two white-box cases in zip_usage has been updated to make fewer assumptions about the output; the validity of the compressed data is what matters, not whether it's exactly the same as the test vector.
2017-10-25Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers erts: Fix so that bind correct schedulers Update version Fix error handling when decoding an AVP with an alternate dictionary Remove unused function arguments Fix faulty recursion vsn -> 2.1.2 Update appup for ERIERL-14684 Fix speling error 'sndbuf' -> 'recbuf' Add zlib:set_controlling_process/2
2017-10-17erts: Add 'used' option to binary_to_term/2Sverker Eriksson
2017-10-13erts: Implement maps path iteratorLukas Larsson
2017-10-12Merge branch 'rickard/null-chars/ERL-370/OTP-14543'Rickard Green
* rickard/null-chars/ERL-370/OTP-14543: Don't allow null chars in various strings Conflicts: erts/emulator/beam/erl_alloc.types erts/preloaded/ebin/erlang.beam
2017-10-12Merge branch 'maint'Rickard Green
* maint: Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint"