aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-11-23erts: Refactor erl_bif_counters.cSverker Eriksson
with more consistent naming.
2018-11-23Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release
2018-11-23Prepare releaseErlang/OTP
2018-11-23Merge branch 'john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237' ↵Erlang/OTP
into maint-21 * john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-23Merge branch 'john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237' ↵John Högberg
into maint * john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-22Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maintSverker Eriksson
AGAIN * sverker/erts/atomics-counters/OTP-13468: erts: Add counters:put/3
2018-11-22erts: Fix faulty assert in driver_SUITESverker Eriksson
Set drv_use_singleton.fd_stop_select to -2 in start() as it's only used by driver_SUITE:driver_select_use.
2018-11-21erts: Clarify erl_nif docs about callback environmentsSverker Eriksson
2018-11-21erts: Add counters:put/3Sverker Eriksson
2018-11-20erts: Improve driver_SUITE:smp_selectSverker Eriksson
to better detect an actual missing ready_input event on slow machines (valgrind) and without wasting time with long sleep on fast machines.
2018-11-20Merge branch 'john/erts/spectre-configure-flag/OTP-15430/ERIERL-237' into ↵John Högberg
john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237 * john/erts/spectre-configure-flag/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-20Allow disabling retpoline in interpreter loopJohn Högberg
We only do this when the user has explicitly told us it's okay to partially disable mitigation (spectre-mitigation=incomplete). The macro is inert if it isn't.
2018-11-20Add a ./configure flag for spectre mitigationJohn Högberg
Note that the ERTS_NO_RETPOLINE macro introduced by this commit is completely inert unless spectre-mitigation is set to 'incomplete.' This includes when mitigation has been manually enabled through CFLAGS, so it should be impossible for it to unintentionally disable mitigation.
2018-11-16Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release
2018-11-16Merge branch 'john/erts/defer-orphan-file-close/OTP-15421/ERIERL-261' into maintJohn Högberg
* john/erts/defer-orphan-file-close/OTP-15421/ERIERL-261: Fix broken assertion on monitor release Avoid closing files in gc/monitor callbacks
2018-11-15Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maintSverker Eriksson
* sverker/erts/atomics-counters/OTP-13468: erts: Add new module 'counters' erts: Add new module 'atomics'
2018-11-15erts: Add new module 'counters'Sverker Eriksson
2018-11-15erts: Add new module 'atomics'Sverker Eriksson
2018-11-15Prepare releaseErlang/OTP
2018-11-14Merge branch 'maint-18' into maintLukas Larsson
* maint-18: Updated OTP version Prepare release Optimize operator '--' and yield on large inputs Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_lists.c erts/vsn.mk lib/stdlib/doc/src/notes.xml lib/stdlib/vsn.mk make/otp_version_tickets otp_versions.table
2018-11-13Fix broken assertion on monitor releaseJohn Högberg
We sometimes bump the refc without messing with the table, which means that we sometimes decrement it while in the table, causing the old assertion to fail. The property we want to check is that neither end of the monitor is present in the table when the monitor is deleted.
2018-11-13Avoid closing files in gc/monitor callbacksJohn Högberg
Closing files in these callbacks could block scheduler progress and cause major system instability. We now defer these operations to a dedicated process instead. This process may in turn block forever and prevent further orphaned files from being closed, but it will keep the emulator itself from misbehaving.
2018-11-09Prepare releaseErlang/OTP
2018-11-09Merge branch 'john/erts/OTP-18.3.4/minusminus_trapping/OTP-15371' into maint-18Erlang/OTP
* john/erts/OTP-18.3.4/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs
2018-11-09Merge branch 'maint-20' into maintLukas Larsson
* maint-20: Updated OTP version Prepare release Optimize operator '--' and yield on large inputs Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_lists.c erts/vsn.mk lib/ssl/doc/src/notes.xml lib/ssl/vsn.mk lib/stdlib/doc/src/notes.xml lib/stdlib/vsn.mk make/otp_version_tickets otp_versions.table
2018-11-09Remove --/2 from dirty BIF testsJohn Högberg
Now that it traps, --/2 would hang forever when building under --enable-dirty-schedulers-test.
2018-11-06Merge branch 'bjorn/erts/persistent_terms/OTP-14669' into maintBjörn Gustavsson
* bjorn/erts/persistent_terms/OTP-14669: Implement a tab for persistent terms in crashdump viewer Add tests of persistent terms for crashdump_viewer Add a persistent term storage Refactor releasing of literals Extend the sharing-preserving routines to optionally copy literals
2018-11-06Add a persistent term storageBjörn Gustavsson
Persistent terms are useful for storing Erlang terms that are never or infrequently updated. They have the following advantages: * Constant time access. A persistent term is not copied when it is looked up. The constant factor is lower than for ETS, and no locks are taken when looking up a term. * Persistent terms are not copied in garbage collections. * There is only ever one copy of a persistent term (until it is deleted). That makes them useful for storing configuration data that needs to be easily accessible by all processes. Persistent terms have the following drawbacks: * Updates are expensive. The hash table holding the keys for the persistent terms are updated whenever a persistent term is added, updated or deleted. * Updating or deleting a persistent term triggers a "global GC", which will schedule a heap scan of all processes to search the heap of all processes for the deleted term. If a process still holds a reference to the deleted term, the process will be garbage collected and the term copied to the heap of the process. This global GC can make the system less responsive for some time. Three BIFs (implemented in C in the emulator) is the entire interface to the persistent term functionality: * put(Key, Value) to store a persistent term. * get(Key) to look up a persistent term. * erase(Key) to delete a persistent term. There are also two additional BIFs to obtain information about persistent terms: * info() to return a map with information about persistent terms. * get() to return a list of a {Key,Value} tuples for all persistent terms. (The values are not copied.)
2018-11-05Prepare releaseErlang/OTP
2018-11-05Merge branch 'john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371' into maint-20Erlang/OTP
* john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs
2018-11-05Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-11-02Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-11-02erts: Fix msacc GC states on dirty schedsLukas Larsson
A dirty scheduler is an un-managed thread so we need to lock the msacc state on those.
2018-11-02Merge branch 'john/erts/minusminus_trapping/OTP-15371' into maintJohn Högberg
* john/erts/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs Inline erts_cmp Clarify a magical allocation size Fix trapping in lists:reverse/2
2018-11-01Merge branch 'maint-20' into maintRickard Green
* maint-20: Updated OTP version Prepare release
2018-11-01Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maintRickard Green
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
2018-10-31Prepare releaseErlang/OTP
2018-10-31Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maint-20Erlang/OTP
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
2018-10-31Fix erts_internal_ref_number_cmp()Rickard Green
2018-10-29Refactor releasing of literalsBjörn Gustavsson
Introudce erts_queue_release_literals() to queue a literal area to be released.
2018-10-29Merge branch 'maint-18' into maintRickard Green
* maint-18: Updated OTP version Prepare release
2018-10-29Merge pull request #1977 from RogierWV/maint/OTP-15389Lukas Larsson
Fix run_erl.c so it compiles on Solaris
2018-10-29Merge branch 'jimdigriz/os_mon/fix_cpu_sup_android/OTP-15387' into maintLukas Larsson
* jimdigriz/os_mon/fix_cpu_sup_android/OTP-15387: Make Erlang's cpu_sup function better on Android SELinux is another cause of MSG_CTRUNC
2018-10-29Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-10-26Prepare releaseErlang/OTP
2018-10-26Inline erts_cmpJohn Högberg
This greatly increases the performance of '--'/2 which does a lot of term comparisons.
2018-10-25Clarify a magical allocation sizeDmytro Lytovchenko
2018-10-25Fix trapping in lists:reverse/2John Högberg
The first stage wasn't bounded by reductions, and it bumped far more reductions than it should have due to a logic bug.
2018-10-24Extend the sharing-preserving routines to optionally copy literalsBjörn Gustavsson
In the implementation of the zero-copying term storage, we want to preserve sharing, but not copy literals because the modules holding the literals could be unloaded under our feet.
2018-10-24Merge pull request #1991 from bjorng/bjorn/erts/fix-max_heap_size/OTP-15360Björn Gustavsson
Honor the max heap size when copying literals after purging