aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2019-03-06Reduce code size for binary matching instructionsBjörn Gustavsson
The new compiler required adding support for Y register for all binary matching instructions. That was (intentionally) done in a naive way that simplicated duplicated the entire body of each instruction. Now it's time to be less naive. Rewrite the binary matching instructions using micro instructions. Because some of the binary instructions are huge, that will significantly decrease the size of process_main(). When compiling with clang, a huge process_main() would mess up profile-guide optimization resulting in a significant performance degradation. On my Mac, profile-guide optimzation would decrease the estone benchmark by 100K estones (about 20 percent). This commit gives me back the lost estones.
2019-03-06Deoptimize obsoleted binary matching instructionsBjörn Gustavsson
Mark the obsoleted instructions bs_start_match2, bs_save2, bs_restore2, and bs_context_to_binary as cold. Remove support of a Y operand for bs_save2 and bs_restore2.
2019-03-06Reclassify get_tuple_element with a Y destination as hotBjörn Gustavsson
get_tuple_element with an Y register has become more frequent with the new compiler.
2019-03-06Remove optimization that has become a pessimizationBjörn Gustavsson
The compiler used to generate "move Literal y(Y)" instructions very rarely. Therefore, there was a transformation to avoid having a "move c y" instruction. With the new compiler, "move Literal y(Y)" instructions are relatively frequent, so we will need a "move c y" instruction.
2019-03-06Introduce move_window2 and remove move2_par_xyxyBjörn Gustavsson
2019-03-06Optimize hd/1 and tl/1 in guardsBjörn Gustavsson
2019-03-06bif_instrs.tab: Don't hardcode length of instructionsBjörn Gustavsson
2019-03-06[socket] Use (new) enif_compare_pids functionMicael Karlberg
Replace the won function for pid compare with the (new) enif_compare_pids function. OTP-15565
2019-03-06[socket] CommentaryMicael Karlberg
Add some more comments in order to increase readability. OTP-15565
2019-03-06[socket] Macro abuse of activate-nextMicael Karlberg
Implemented the activate_next function and added its "users" acceptor, writer and reader (macro abuse). After a request (accept, write or send) has been either successfully completed or failed, another request should be activated. Previously only one attempt was made, which might leave the other (waiting) requestors hanging. Now, instead we use a 'activate-next' function that pop's the request (accept, wrote or read) queue until success or its empty, thereby making sure that no waiting processes is left hanging. OTP-15565
2019-03-06beam_emu.c: Rename the confusing macro GetR() to GetSource()Björn Gustavsson
2019-03-05Prepare releaseErlang/OTP
2019-03-05Merge branch 'lukas/erts/fix_inet_buffer_auto_adjust/OTP-15651/OTP-15652' ↵Erlang/OTP
into maint-21 * lukas/erts/fix_inet_buffer_auto_adjust/OTP-15651/OTP-15652: kernel runtime dependency to erts erts: Add yield via timeout to inet read_packet erts: Don't increase buffer when sctp sndbuf is set erts: Only change inet buffer if not set
2019-03-05Merge branch 'rickard/make-fixes-21/OTP-15551' into maint-21Erlang/OTP
* rickard/make-fixes-21/OTP-15551: Fix install phase in build system
2019-03-05[socket] Make use of official monitor to term functionMicael Karlberg
Remove own function to make monitor printable (was a hack) and make use of the new enif_make_monitor_term instead.
2019-03-04Merge branch 'rickard/make-fixes-21/OTP-15551' into maintRickard Green
* rickard/make-fixes-21/OTP-15551: Fix install phase in build system
2019-03-04Merge branch 'bmk/20190304/openindiana_types' into ↵Micael Karlberg
bmk/20190301/cleanup_through_macro_abuse/OTP-15565
2019-03-04[socket] Fixed various type size and unused function warningsMicael Karlberg
Fixed some type size warnings (SCTP related). E.g: On Solaris 11 (OpenIndiana Hipster) long and int is size 4, but the way Sint32 def works it first "tests" for long size and if that is correct, that is chosen (which it is on Solaris 11). On linux long is size 8, so Sint32 will be defined as int. ... On Solaris 11 the flags TCP_CONGESTION and SO_BINDTODEVICE does not exist, so the function(s) n[set|get]opt_str_opt is never used. So, in order to keep the compiler quiet, we add some if-def to exclude these functions in this case.
2019-03-04Merge 'rickard/make-fixes-21/OTP-15551' into 'rickard/make-fixes-22/OTP-15551'Rickard Green
* rickard/make-fixes-21/OTP-15551: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Merge 'rickard/make-fixes-20/OTP-15551' into 'rickard/make-fixes-21/OTP-15551'Rickard Green
* rickard/make-fixes-20/OTP-15551: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Merge 'rickard/make-fixes-19/OTP-15551' into 'rickard/make-fixes-20/OTP-15551'Rickard Green
* rickard/make-fixes-19/OTP-15551: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Merge 'rickard/make-fixes-18/OTP-15551' into 'rickard/make-fixes-19/OTP-15551'Rickard Green
* rickard/make-fixes-18/OTP-15551: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Merge 'rickard/make-fixes-17/OTP-15551' into 'rickard/make-fixes-18/OTP-15551'Rickard Green
* rickard/make-fixes-17/OTP-15551: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Fix install phase in build systemRickard Green
- Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply.
2019-03-04Merge pull request #2163 from filmor/float-etf-docSverker Eriksson
Clarify in the docs that (NEW_)FLOAT_EXT must be finite
2019-03-04[socket] Some minor cleanup and commentsMicael Karlberg
2019-03-04Merge branch 'maint'Sverker Eriksson
2019-03-04Merge PR-2161 sverker/to_erl-utf8/ERL-854 OTP-15650 into maintSverker Eriksson
* sverker/to_erl-utf8/ERL-854: erts: Remove 7-bit ASCII limitation in to_erl
2019-03-04[socket] Macro abuse for requestor queue func defMicael Karlberg
The requestor (acceptor, writer and reader) functions are virtually identical, so to ensure quality and not having to write the exact same functions three times, we make use of some macro magic for their declaration. OTP-15565
2019-03-04[net] Macro abuse for func defMicael Karlberg
Some more macro abuse for nif API callback functions. OTP-15565
2019-03-04[socket] Macro abuse for more func defMicael Karlberg
Some more macro abuse for nif API callback functions and the operator (acceptor, writer and reader) queue wrapper functions (search4pid, push, pop and unqueue). OTP-15565
2019-03-04[socket] Macro abuse for setopt(otp) and getopt(otp)Micael Karlberg
2019-03-04[socket|net] Macro abuseMicael Karlberg
Make use of macro concat magic to simplify declarations. OTP-15565
2019-03-04Merge branch 'bmk/20190301/socket_test_cleanup'Micael Karlberg
2019-03-04Merge branch 'maint'Siri Hansen
2019-03-04Merge branch 'siri/logger/os-timestamp/OTP-15625' into maintSiri Hansen
* siri/logger/os-timestamp/OTP-15625: Update preloaded [logger] Change timestamp from erlang:system_time to os:system_time
2019-03-04Merge branch 'bmk/20190301/net_test/OTP-15635'Micael Karlberg
2019-03-04Merge pull request #2167 from bjorng/bjorn/tune-beamBjörn Gustavsson
Tune BEAM instructions for the new compiler (part 1)
2019-03-01Add a howto for counting instructionsBjörn Gustavsson
2019-03-01Combine is_nonempty_list with get_hd/get_tlBjörn Gustavsson
The is_nonempty_list test is very frequently followed by get_tl, and frequently followed by get_hd.
2019-03-01Remove the combined instruction is_nonempty_list_test_heapBjörn Gustavsson
It turns out that the combination of is_nonempty_list and test_heap is no longer frequent.
2019-03-01Combine more init instructionsBjörn Gustavsson
2019-03-01Combine test_arity with get_tuple_elementBjörn Gustavsson
The test_arity instruction is often followed by get_tuple_element.
2019-03-01Combine get_tuple_element when destinations are not consecutiveBjörn Gustavsson
2019-03-01[socket|test] Quiet logger and ttest improvementsMicael Karlberg
Add a quiet logger mode (default) which limits the printouts in the (erlang) shell (the web log will be as verbose as usual). Also added a way to configure the runtime of the ttest cases.
2019-03-01[socket|test] Moved old test modulesMicael Karlberg
Moved the old socket test modules into its own (temporary?) directory.
2019-03-01[net] Fixed name_and_addr_info test caseMicael Karlberg
The test case did not consider that the machine might have both IPv4 (inet) and IPv6 (inet6) domain interfaces. OTP-15635
2019-03-01[net] Fixed getnameinfo functionMicael Karlberg
The getnameinfo function has been fixed: 1) Faulty sockaddr decode success check 2) Incorrect (name info) return value OTP-15636
2019-03-01[net|test] Add "proper" test suiteMicael Karlberg
Add a (basically) placeholder test suite for the net module. OTP-15635
2019-02-28Remove rarely used swap instructionsBjörn Gustavsson
`swap x y` is rarely or never used. I found a single use of `swap_temp x y x` in the sample of modules compiled by `scripts/diffable`.