aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-12-13Merge branch 'maint'Sverker Eriksson
2018-12-13Merge branch 'sverker/add-since-doc/OTP-15460' into maintSverker Eriksson
* sverker/add-since-doc/OTP-15460: Fill in since for multi-clause functions in erlang.erl Fix since attribute for troubled function docs Add empty 'since' attribute for old modules and functions Add since attribute to dtd Add "since" attributes in xml for new functions and modules erl_docgen: Generate "since" OTP version in html erl_interface: Fix doc for return type 'struct hostent'
2018-12-13Fill in since for multi-clause functions in erlang.erlSverker Eriksson
The ones marked since="?" are unknown (but newer than R13B03) monitor/2 port_info/2 process_flag/2 statistics/1 system_flag/2 system_info/1 trace_pattern/3
2018-12-13Merge branch 'maint'Sverker Eriksson
2018-12-13Merge PR-2050 from legoscia/atomics-counters-typosSverker Eriksson
Fix typos in atomics.xml and counters.xml
2018-12-13Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: Cover code in beam_ssa_opt Cover code in beam_ssa_dead Cover code in beam_trim Eliminate warnings for unused variables regressions_SUITE: Fix exports map_SUITE: Test for mixed map creation map_SUITE: Fix indentation
2018-12-13Merge pull request #2047 from bjorng/bjorn/erts/eliminate-gc-bifs/OTP-15440Björn Gustavsson
Simplify implementation of GC BIFs
2018-12-13Simplify GC BIFsBjörn Gustavsson
Summary: This commit simplifies the implementation of the "GC BIFs" so that they no longer need to do a garbage collection, removing duplicate code for all GC BIFs in the runtime system, as well as potentially reducing the size of the loaded BEAM code by using shorter instructions calling those BIFs. A GC BIF is a guard BIF that will do a garbage collection if it needs to build anything on the heap. For example, `abs/1` is a GC BIF because it might need to allocate space on the heap (if the result is a floating point number or the resulting integer is a bignum). Before R12, a guard BIF (such as `abs/1`) that need to allocate heap space would allocate outside of process's main heap, in a heap fragment. GC BIFs were introduced in R12B to support literals. During garbage collection it become necessary to quickly test whether a term was a literal. To make the check simple, guards BIFs were no longer allowed to create heap fragments. Instead GC BIFs were introduced. In OTP 19, the implementation of literals was changed to support storing messages in heap fragments outside of the main heap for a process. That change again made it allowed for guard BIFs to create heap fragments when they need to build terms on the heap. It would even be possible for the guard BIFs to build directly on the main heap if there is room there, because the compiler assumes that a new `test_heap/2` instruction must be emitted when building anything after calling a GC BIF. (We don't do that in this commit; see below.) This commit simplifies the implementation of the GC BIFs in the runtime system. Each GC BIF had a dual implementation: one that was used when the GC BIF was called directly and one used when it was called via `apply/3`. For example, `abs/1` was implemented in `abs_1()` and `erts_gc_abs_1()`. This commit removes the GC version of each BIF. The other version that allocates heap space using `HAlloc()` is updated to use the new `HeapFragOnlyAlloc()` macro that will allocate heap space in a heap fragment outside of the main heap. Because the BIFs will allocate outside of the main heap, the same `bif` instructions used by nonbuilding BIFs can be used for the (former) GC BIFs. Those instructions don't use the macros that save and restore the heap and stack pointers (SWAPOUT/SWAPIN). If the former GC BIFs would build on the main heap, either new instructions would be needed, or SWAPOUT/SWAPIN instructions would need to be added to the `bif` instructions. Instructions that call the former GC BIFs don't need the operand that specifies the number of live X registers. Therefore, the instructions that call the BIFs are usually one word shorter.
2018-12-13Merge branch 'bjorn/erts/remove-faulty-assertion'Björn Gustavsson
* bjorn/erts/remove-faulty-assertion: erl_bif_list: Remove faulty assertion
2018-12-13Merge branch 'maint'Björn Gustavsson
* maint: Fix reading beyond end of bignum in integer squaring
2018-12-13Merge pull request #2051 from bjorng/bjorn/erts/bignum/OTP-15484Björn Gustavsson
Fix reading beyond end of bignum in integer squaring
2018-12-13Fix reading beyond end of bignum in integer squaringBjörn Gustavsson
The multiplication of two bignums is specially optimized when the two operands have the same address, because squaring can be done more efficiently than multiplication of two arbitrary integers. That is, expressions such as `I * I` will be calculated by squaring the value of `I`. The optimized function for squaring would read one word beyond the end of the bignum in the last iteration of a loop. The garbage value would never be used. In almost all circumstances that would be harmless. Only if the read word happened to fall on the start of an unmapped page would the runtime crash. That is unlikely to happen because most bignums are stored on a process heap, and since the stack is located at the other end of the block that the heap is located in, the word beyond the end of bignum is guaranteed to be readable.
2018-12-12Fix since attribute for troubled function docsSverker Eriksson
2018-12-12Add empty 'since' attribute for old modules and functionsSverker Eriksson
2018-12-11Add since attribute to dtdSverker Eriksson
2018-12-11Add "since" attributes in xml for new functions and modulesSverker Eriksson
introduced after OTP_R13B03.
2018-12-11Fix typos in atomics.xml and counters.xmlMagnus Henoch
2018-12-11Merge branch 'sverker/erts/ets-debug-test-cuddle'Sverker Eriksson
* sverker/erts/ets-debug-test-cuddle: erts: Fix volatile ets test case failures on debug VM
2018-12-11erl_docgen: Generate "since" OTP version in htmlSverker Eriksson
for <func><name> and <module> with "since" attribute.
2018-12-11erl_interface: Fix doc for return type 'struct hostent'Sverker Eriksson
'*' is part of the return type, not the function name.
2018-12-11Merge branch 'maint'Henrik Nord
* maint: Updated OTP version Prepare release
2018-12-10erl_bif_list: Remove faulty assertionBjörn Gustavsson
The variable can be an empty list.
2018-12-10Updated OTP versionOTP-21.2Erlang/OTP
2018-12-10Prepare releaseErlang/OTP
2018-12-10Merge pull request #2041 from michalmuskala/mm/configure-fixLukas Larsson
Fix --without-APP config option
2018-12-07Merge branch 'maint'Henrik Nord
* maint: Updated OTP version Prepare release
2018-12-07Merge branch 'maint-20' into maintHenrik Nord
* maint-20: Updated OTP version Prepare release
2018-12-07Merge branch 'maint'Dan Gudmundsson
* maint: Don't try to wake up wx thread when not necessary
2018-12-07Merge branch 'dgud/wx/perf-imp' into maintDan Gudmundsson
* dgud/wx/perf-imp: Don't try to wake up wx thread when not necessary
2018-12-07Merge branch 'maint'Henrik Nord
2018-12-07Merge branch 'henrik/ERIERL-278/OTP-15470' into maintHenrik Nord
* henrik/ERIERL-278/OTP-15470: Handle erroneous length during decode (BER only) without crashing
2018-12-07Merge pull request #2046 from ↵John Högberg
jhogberg/john/erts/mark-pooled-free-blocks-unused/OTP-15075 Mark free blocks in pooled carriers as unused
2018-12-07Mark free blocks in pooled carriers as unused (MADV_FREE)John Högberg
This lets the OS reclaim the physical memory associated with these blocks which reduces the impact of long-lived awkward allocations. A small allocated block will still keep a huge carrier alive, but the unused part of the carrier will now be available to the OS. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-12-06Don't try to wake up wx thread when not necessaryDan Gudmundsson
That kills performance on at least windows when a the load goes up and a lot of commands is sent to the driver.
2018-12-06Updated OTP versionOTP-20.3.8.15Erlang/OTP
2018-12-06Prepare releaseErlang/OTP
2018-12-06Merge branch 'henrik/ERIERL-278/OTP-15470' into maint-20Erlang/OTP
* henrik/ERIERL-278/OTP-15470: Handle erroneous length during decode (BER only) without crashing
2018-12-06Handle erroneous length during decode (BER only) without crashingKenneth Lundin
2018-12-06Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/erl_process.c
2018-12-06Merge branch 'lukas/OTP-21.1.1/scheduler_pollset/OTP-15475' into maintLukas Larsson
* lukas/OTP-21.1.1/scheduler_pollset/OTP-15475: erts: Move fds with active true behaviour to own pollset erts: Fix lists_member_2 reduction count erts: Allow code_model_small to be set in xcomp setting erts: Implement delay_send using timer instead of poll erts: Optimize driver_set_timer(0) to fire at once erts: Optimize the inet driver multi timers for one timer erts: Move all inet tcp CONNECTED timers to multi timer erts: Add erts_io_notify_port_task_executed to check_io msacc state erts: Add pre-alloc to ALLOC msacc state erts: Make thr prgr wakeup current or sched 1 erts: Pass thread progress data where possible
2018-12-06erts: Move fds with active true behaviour to own pollsetLukas Larsson
At start of the VM a poll-set that the schedulers will check is created where fds that have triggered many (at the moment, many means 10) times without being deselected inbetween. In this scheduler specific poll-set fds do not use ONESHOT, which means that the number of syscalls goes down dramatically for such fds. This pollset is introduced in order to handle fds that are used by the erlang distribution and that never change their state from {active, true}. This pollset only handles ready_input events, ready_output is still handled by the poll threads. During overload, polling the scheduler poll-set is done on a 10ms timer.
2018-12-06Merge branch 'maint'Raimo Niskanen
2018-12-06Merge branch 'kenneth/asn1/ERIERL-278/OTP-15470' into maintRaimo Niskanen
* 'kenneth/asn1/ERIERL-278/OTP-15470' of git-server:kenneth_otp: Handle erroneous length during decode (BER only) without crashing
2018-12-06Merge branch 'raimo/test-cuddling' into maintRaimo Niskanen
* raimo/test-cuddling: Rewrite to work for stream connection Update Linux version for pktoptions TTL
2018-12-06beam_makeops: Correct generation of pack instructionsBjörn Gustavsson
On a 32-bit machine, `beam_makeops` would generate incorrect pack instructions for instructions such as: i_plus x x j? d See the added comment block for a detailed description of the problem and its fix.
2018-12-06Merge branch 'maint'Björn Gustavsson
* maint: Fix unsafe optimization of stack trace building
2018-12-06Merge pull request #2043 from bjorng/bjorn/compiler/tuple_sizeBjörn Gustavsson
beam_ssa_pre_codegen: Fix an internal consistency failure
2018-12-06Merge pull request #2042 from bjorng/bjorn/compiler/stacktrace/OTP-15481Björn Gustavsson
Fix unsafe optimization of stack trace building
2018-12-05erts: Fix volatile ets test case failures on debug VMSverker Eriksson
Symptom: Test cases with small key ranges sometimes failed on debug VM with: "No routing nodes in table? Debug feature 'ets_force_split' does not seem to work." Solution: Don't provoke randomly joins when force_split is set.
2018-12-05Rewrite to work for stream connectionRaimo Niskanen