Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-03-20 | Optimize moving of several Y registers to X registers | Björn Gustavsson | |
Introduce move_src_window[234] instructions for moving several consecutively numbered Y registers to discontiguously numbered X registers. This optimization is effective because the compiler has sorted the `move` instructions in Y register order. | |||
2019-03-19 | Optimize map updating instructions | Björn Gustavsson | |
2019-03-19 | Optimize funs converted to literals | Björn Gustavsson | |
2019-03-19 | Combine move and init to move_shift | Björn Gustavsson | |
2019-03-19 | Remove the move_dup instruction | Björn Gustavsson | |
move_dup is used very infrequently. | |||
2019-03-19 | Optimize some common uses of '+' and '-' | Björn Gustavsson | |
2019-03-19 | Extend move_shift to accept a literal Src operand | Björn Gustavsson | |
2019-03-19 | Tune the move_jump instruction | Björn Gustavsson | |
With the new compiler, it has become less common with a move to x(0) before a jump. Change the move_jump instruction to take a destination as well as a source. | |||
2019-03-19 | Eliminate i_length_setup with a literal list operand | Björn Gustavsson | |
2019-03-19 | Replace swap_temp with swap more aggressively | Björn Gustavsson | |
Also support swap of Y registers. | |||
2019-03-19 | beam_makeops: Eliminate warning | Björn Gustavsson | |
2019-03-19 | Add another move_shift variation | Björn Gustavsson | |
It turns out that sequences such as the following are common: move x0 Y1 move Y2 x0 | |||
2019-03-19 | Combine move with trim | Björn Gustavsson | |
It is relatively common to move something from a Y register to an X register before trimming. | |||
2019-03-19 | Refactor put_list instructions for readability | Björn Gustavsson | |
Apart from the refactoring, the instruction "put_list x c y" is replaced with "put_list x n y". | |||
2019-03-19 | Combine is_tuple with is_tagged_tuple | Björn Gustavsson | |
2019-03-19 | beam_load.c: Introduce the GENOP_NAME_ARITY() macro | Björn Gustavsson | |
Introduce the GENOP_NAME_ARITY() macro to avoid setting the arity wrong for for an instruction. | |||
2019-03-19 | beam_debug: Stop disassembling after call_nif | Björn Gustavsson | |
That will avoid showing garbage instructions that will never be executed. | |||
2019-03-19 | beam_debug: Properly disassemble i_bs_match_string_yfWW | Björn Gustavsson | |
2019-03-18 | Merge branch 'bmk/20190315/net_memleak' | Micael Karlberg | |
2019-03-18 | Merge branch 'bmk/20190315/use_wrong_current_when_stopping' | Micael Karlberg | |
2019-03-18 | Merge branch 'bmk/20190314/socket_invalid_activate_next_for_write' | Micael Karlberg | |
2019-03-18 | Merge branch 'bmk/20190312/linked_test_procs' | Micael Karlberg | |
2019-03-15 | Merge branch 'sverker/ets-select-fixation-owner-change-bug/OTP-15672' | Sverker Eriksson | |
* sverker/ets-select-fixation-owner-change-bug/OTP-15672: erts: Fix bug for yielding ets:replace | |||
2019-03-15 | erts: Fix bug for yielding ets:replace | Sverker Eriksson | |
Found by valgrind: Conditional jump or move depends on uninitialised value(s) Suspected: ets_select_replace_1:3034 [erl_db.c] Bug introduced by already merged parent commit 0d550c80d4f19cc432e7de056169695d436c02a0. | |||
2019-03-15 | [net] Fixed memory leak in address info encoding | Micael Karlberg | |
Fixed a memory leak in the function for address infos encoding. | |||
2019-03-15 | Merge branch 'sverker/ets-select-fixation-owner-change-bug/OTP-15672' | Sverker Eriksson | |
* sverker/ets-select-fixation-owner-change-bug/OTP-15672: erts: Fix ets:select table fixation leak at owner change erts: Refactor common things into traverse_context_t stdlib: Clarify docs for ets:info(_, safe_fixed) | |||
2019-03-15 | [socket] Fixing debug printout | Micael Karlberg | |
A debug printout in the socket_stop fucntion used the wrong requestor record for the pid, which may leasd to a confusing debug printout. | |||
2019-03-14 | [socket] The activate-next always used read select | Micael Karlberg | |
The activate-next (reader|writer|acceptor) always *incorrectly* used the read select function. This has now been changed so that the functions are created via a macro with an argument specifying which select function to use. | |||
2019-03-14 | Merge pull request #2181 from KronicDeth/patch-2 | Lukas Larsson | |
retranspissions -> retransmissions | |||
2019-03-14 | retranspissions -> retransmissions | Luke Imhoff | |
2019-03-13 | Merge pull request #2177 from bjorng/bjorn/erts/tail-recursive-bifs | Björn Gustavsson | |
Optimize tail-recursive calls of BIFs OTP-15674 | |||
2019-03-13 | Merge branch 'bmk/20190308/socket_limitations' | Micael Karlberg | |
2019-03-13 | Merge branch 'bmk/20190306/win32_fixes' | Micael Karlberg | |
2019-03-13 | Merge branch 'bmk/20190301/cleanup_through_macro_abuse/OTP-15565' | Micael Karlberg | |
2019-03-12 | [socket|test] Make the evaluator processes linked | Micael Karlberg | |
If a test case timed out, all processes created by it should die. But because the 'evaluator' processes where created with spawn_monitor, that was not the case, and therefor, these processes could linger. | |||
2019-03-12 | Merge branch 'maint' | Henrik Nord | |
* maint: Updated OTP version Prepare release | |||
2019-03-11 | erts: Fix ets:select table fixation leak at owner change | Sverker Eriksson | |
Symtom: ETS table remains fixed after finished ets:select* call. Problem: The decision to unfix table after a yielding ets:select* is based on table ownership, but ownership might have changed while ets:select* was yielding. Solution: Remember and pass along whether table was fixed when the traversal started. | |||
2019-03-11 | erts: Refactor common things into traverse_context_t | Sverker Eriksson | |
and rename it from match_callbacks_t. | |||
2019-03-11 | Prepare release | Erlang/OTP | |
2019-03-09 | Optimize tail-recursive calls of BIFs | Björn Gustavsson | |
BEAM currently does not call BIFs at the end of a function in a tail-recursive way. That is, when calling a BIF at the end of a function, the BIF is first called, and then the stack frame is deallocated, and then control is transferred to the caller. If there is no stack frame when a BIF is called in the tail position, the loader will emit a sequence of three instructions: first an instruction that allocates a stack frame and saves the continuation pointer (`allocate`), then an instruction that calls the BIF (`call_bif`), and lastly an instruction that deallocates the stack frame and returns to the caller (`deallocate_return`). The old compiler would essentially allocate a stack frame for each clause in a function, so it would not be that common that a BIF was called in the tail position when there was no stack frame, so the three-instruction sequence was deemed acceptable. The new compiler only allocates stack frames when truly needed, so the three-instruction BIF call sequence has become much more common. This commit introduces a new `call_bif_only` instruction so that only one instruction will be needed when calling a BIF in the tail position when there is no stack frame. This instruction is also used when there is a stack frame to make it possible to deallocate the stack frame **before** calling the BIF, which may make a subsequent garbage collection at the end of the BIF call cheaper (copying less garbage). The one downside of this change is that the function that called the BIF will not be included in the stack backtrace (similar to how a tail-recursive call to an Erlang function will not be included in the backtrace). That was the quick summary of the commit. Here comes a detailed look at how BIF calls are translated by the loader. The first example is a function that calls `setelement/3` in the tail position: update_no_stackframe(X) -> setelement(5, X, new_value). Here is the BEAM code: {function, update_no_stackframe, 1, 12}. {label,11}. {line,[...]}. {func_info,{atom,t},{atom,update_no_stackframe},1}. {label,12}. {move,{x,0},{x,1}}. {move,{atom,new_value},{x,2}}. {move,{integer,5},{x,0}}. {line,[...]}. {call_ext_only,3,{extfunc,erlang,setelement,3}}. Because there is no stack frame, the `call_ext_only` instruction will be used to call `setelement/3`: {call_ext_only,3,{extfunc,erlang,setelement,3}}. The loader will transform this instruction to a three-instruction sequence: 0000000020BD8130: allocate_tt 0 3 0000000020BD8138: call_bif_e erlang:setelement/3 0000000020BD8148: deallocate_return_Q 0 Using the `call_bif_only` instruction introduced in this commit, only one instruction is needed: 000000005DC377F0: call_bif_only_e erlang:setelement/3 `call_bif_only` calls the BIF and returns to the caller. Now let's look at a function that already has a stack frame when `setelement/3` is called: update_with_stackframe(X) -> foobar(X), setelement(5, X, new_value). Here is the BEAM code: {function, update_with_stackframe, 1, 14}. {label,13}. {line,[...]}. {func_info,{atom,t},{atom,update_with_stackframe},1}. {label,14}. {allocate,1,1}. {move,{x,0},{y,0}}. {line,[...]}. {call,1,{f,16}}. {move,{y,0},{x,1}}. {move,{atom,new_value},{x,2}}. {move,{integer,5},{x,0}}. {line,[...]}. {call_ext_last,3,{extfunc,erlang,setelement,3},1}. Since there is a stack frame, the `call_ext_last` instruction will be used to deallocate the stack frame and call the function: {call_ext_last,3,{extfunc,erlang,setelement,3},1}. Before this commit, the loader would translate this instruction to: 0000000020BD81B8: call_bif_e erlang:setelement/3 0000000020BD81C8: deallocate_return_Q 1 That is, the BIF is called before deallocating the stack frame and returning to the calling function. After this commit, the loader will translate the `call_ext_last` like this: 000000005DC37868: deallocate_Q 1 000000005DC37870: call_bif_only_e erlang:setelement/3 There are still two instructions, but now the stack frame will be deallocated before calling the BIF, which could make the potential garbage collection after the BIF call slightly more efficient (copying less garbage). We could have introduced a `call_bif_last` instruction, but the code for calling a BIF is relatively large and there does not seem be a practical way to share the code between `call_bif` and `call_bif_only` (since the difference is at the end, after the BIF call). Therefore, we did not want to clone the BIF calling code yet another time to make a `call_bif_last` instruction. | |||
2019-03-09 | Merge pull request #2176 from josevalim/jv-beam-load-message | Björn Gustavsson | |
Clarify beam_load error message on file/module mismatch | |||
2019-03-08 | Merge pull request #2175 from jhogberg/john/erts/enif_term_type/OTP-15640 | John Högberg | |
erts: Add enif_term_type | |||
2019-03-08 | [net|doc] Add notes regarding what does not work (yet) | Micael Karlberg | |
2019-03-08 | [socket|doc] Add notes regarding what does not work (yet) | Micael Karlberg | |
2019-03-08 | Clarify beam_load error message on file/module mismatch | José Valim | |
This is particularly important in case insensitive filesystems, where attempting to invoke a module with the wrong case leads to confusing error messages: 1> erlpress_core:foo(). beam/beam_load.c(1428): Error loading module 'erlpress_core': module name in object code is erlPress_core Loading of erlPress_core.beam failed: :badfile This commit replaces object code by BEAM file and improves the readability of the message. | |||
2019-03-08 | Merge branch 'sverker/master/ets-no-mbuf-trapping/OTP-15660' | Sverker Eriksson | |
* sverker/master/ets-no-mbuf-trapping/OTP-15660: erts: Remove ets traversal yielding if heap fragment | |||
2019-03-08 | Merge pull request #2174 from bjorng/bjorn/tune-beam-2 | Björn Gustavsson | |
Tune BEAM instructions for the new compiler (part 2) | |||
2019-03-07 | Merge branch 'sverker/maint/ets-no-mbuf-trapping/OTP-15660' | Sverker Eriksson | |
into sverker/master/ets-no-mbuf-trapping/OTP-15660 | |||
2019-03-07 | Merge branch 'sverker/ets-no-mbuf-trapping/OTP-15660' | Sverker Eriksson | |
into sverker/maint/ets-no-mbuf-trapping/OTP-15660 | |||
2019-03-07 | erts: Remove ets traversal yielding if heap fragment | Sverker Eriksson | |
Many heap fragments do no longer make the GC slow. Even worse, we are not guaranteed that a yield will provoke a GC removing the fragments, which might lead to a one-yield-per-bucket scenario if the heap fragment(s) still remains after each yield. |