aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2017-09-15Merge branch 'maint'Sverker Eriksson
2017-09-15Merge branch 'bjorn/erts/pack-combined'Björn Gustavsson
* bjorn/erts/pack-combined: Pack combined instructions beam_makeops: Refactor code generation Correct disassembly of select instructions
2017-09-15Merge branch 'lukas/erts/remove-dirty-scheduler-defines/OTP-14613'Lukas Larsson
* lukas/erts/remove-dirty-scheduler-defines/OTP-14613: erts: Remove possibility to disable dirty schedulers
2017-09-14Correct disassembly of select instructionsBjörn Gustavsson
Make sure to use the 'unpacked[-1]' when accessing the unpacked arguments.
2017-09-14Merge branch 'bjorn/erts/relative-jumps'Björn Gustavsson
* bjorn/erts/relative-jumps: Pack failure labels in i_select_val2 and i_select_tuple_arity2 Optimize i_select_tuple_arity2 and is_select_lins Rewrite select_val_bins so that its labels can be packed Pack sequences of trailing 'f' operands Implement packing of 'f' and 'j' Make sure that mask literals are 64 bits Use relative failure labels Add information about offset to common group start position Remove JUMP_OFFSET Refactor instructions to support relative jumps Introduce a new trace_jump/1 instruction for tracing Avoid using $Src more than once
2017-09-14Pack failure labels in i_select_val2 and i_select_tuple_arity2Björn Gustavsson
2017-09-14Optimize i_select_tuple_arity2 and is_select_linsBjörn Gustavsson
Don't save a pointer to the default failure label. That could relieve register pressure. Instead, if we'll need to signal an error in i_select_tuple_arity2, delay to the execution phase. That should be a clear win because i_select_tuple_arity2 very rarely fails because of the term being selected is not a tuple.
2017-09-14Rewrite select_val_bins so that its labels can be packedBjörn Gustavsson
2017-09-14Pack sequences of trailing 'f' operandsBjörn Gustavsson
Pack sequences of trailing 'f' operands for instructions such at jump_on_val or i_select_val_lins.
2017-09-14Implement packing of 'f' and 'j'Björn Gustavsson
2017-09-14Use relative failure labelsBjörn Gustavsson
Relative failure in itself is not an optimization, but we plan to pack failure labels in the future to save memory.
2017-09-14Add information about offset to common group start positionBjörn Gustavsson
2017-09-14Remove JUMP_OFFSETBjörn Gustavsson
It has served its purpose.
2017-09-13Merge branch 'sverker/19/on_load-on_load-bug/OTP-14612' into ↵Sverker Eriksson
sverker/on_load-on_load-bug/OTP-14612
2017-09-13erts: Fix 'on_load' tracing bug for modules with -on_loadSverker Eriksson
Symptom: VM crash when erlang:trace_pattern(on_load, ..) is set and module with -on_load is loaded. Problem: Tracing and -on_load clash in their use of Export.beam[1] Solution: Do not do call set_default_trace_pattern in finish_loading_1 for modules with -on_load. finish_after_on_load_2 will do that anyway.
2017-09-13Refactor instructions to support relative jumpsBjörn Gustavsson
Introduce new macros that can be used for relative jumps and use them consistently. Test that everything works by using a non-zero constant JUMP_OFFSET. The loader subtracts JUMP_OFFSET from loaded labels, and all instructions that use 'f' operands add it back.
2017-09-13Merge branch 'bjorn/erts/improve-beam-ops'Björn Gustavsson
* bjorn/erts/improve-beam-ops: Add built-in macros $ARG_POSITION() and $IS_PACKED() Use 't' instead of 'I' bit syntax operands Optimize operand type for match context in i_bs_get_integer Change operand type from 's' to 'S' for a few instructions Use the correct name of the parameter
2017-09-13Merge pull request #1544 from michalmuskala/eq-optBjörn Gustavsson
Optimise equality comparisons
2017-09-13Merge branch 'potatosalad/erts/binary_find_bif_improved/PR-1480/OTP-14610'Lukas Larsson
* potatosalad/erts/binary_find_bif_improved/PR-1480/OTP-14610: stdlib: Improved BIF for binary matches and split.
2017-09-12Merge branch 'maint'Sverker Eriksson
2017-09-12Merge branch 'sverker/ets-fix-assert-fix' into maintSverker Eriksson
* sverker/ets-fix-assert-fix: erts: Fix faulty ASSERT of table fixation counter
2017-09-12Merge branch 'maint'Sverker Eriksson
2017-09-12Merge branch 'sverker/valgrind-fixes/OTP-14609' into maintSverker Eriksson
* sverker/valgrind-fixes/OTP-14609: erts: Suppress false memory leak for dlerror [ct] Cleanup and rename purify related functions as valgrind Revert "remove unused purify functions" erts: Fix memory leak when sending to terminating port erts: Fix harmless use of uninitialised value
2017-09-11Use 't' instead of 'I' bit syntax operandsBjörn Gustavsson
The number of live registers, unit and flags, and the number of slots all fit comortably in 16 bits. This change will give more opportunities for packing.
2017-09-11Optimize operand type for match context in i_bs_get_integerBjörn Gustavsson
The match context is always in an X register. Change the 's' operand to 'x'. While we are it, also change the operands for Live and FlagsAndUnit to 't' (they will both fit comfortably in 16 bits).
2017-09-11Change operand type from 's' to 'S' for a few instructionsBjörn Gustavsson
'S' is slightly more efficient. Using 'S' may also enable more packing.
2017-09-11Use the correct name of the parameterBjörn Gustavsson
2017-09-11Introduce a new trace_jump/1 instruction for tracingBjörn Gustavsson
As a preparation for introducing relative jumps, introduce "trace_jump W" that can be used for tracing. This instruction will continue to have an absolute address for the jump target. (Note: This instruction is never created during loading; it is only created in stubs when tracing is active.)
2017-09-11Avoid using $Src more than onceBjörn Gustavsson
The C compiler will probably optimize this, but just to be sure...
2017-09-11Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/sys/unix/sys.c
2017-09-11Merge branch 'lukas/erts/fix_warnings' into maintLukas Larsson
* lukas/erts/fix_warnings: Fix some clang warnings Fix unused-functions warnings
2017-09-11Fix some clang warningsLukas Larsson
2017-09-11Fix unused-functions warningsLukas Larsson
2017-09-11erts: Remove possibility to disable dirty schedulersLukas Larsson
2017-09-11beam_debug: Add support for printing 'S' operandsBjörn Gustavsson
The 'S' operand type was added in 5bf73db9fd77.
2017-09-11Merge branch 'maint'John Högberg
2017-09-08Merge branch 'bjorn/erts/improve-beam-ops'Björn Gustavsson
* bjorn/erts/improve-beam-ops: Don't allow macros to assign to hard-coded variables Annotate try_case_end as cold beam_emu.c: Mark initialization code as unlikely Try to avoid generating unecessary do/while wrappers Eliminate unecessary instruction macro i_move_call_only()
2017-09-08Optimise equality comparisonsMichał Muskała
* In both loader and compiler, make sure constants are always the second operand - many passes of the compiler assume that's always the case. * In loader rewrite is_eq_exact with same arguments to skip the instruction and with different constants move one to an x register to maintain the properly outlined above. * The same (but in reverse) is done with the is_ne_exact, where we rewrite to an unconditional jump or add a move to an x register. * All of the above allow to replace is_eq_exact_fss with is_eq_exact_fyy and is_ne_exact_fss with is_ne_exact_fSS as those are the only possibilities left.
2017-09-07Replace ad-hoc MIN/MAX macros with common onesJohn Högberg
Besides being noisy, they were already defined by a global Unix- specific header, causing the Windows build to fail if one forgot to define them.
2017-09-06stdlib: Improved BIF for binary matches and split.Andrew Bennett
2017-09-06Merge branch 'maint' into john/erts/merge-zlib-and-vector-qJohn Högberg
2017-09-06Merge branch 'lukas/erts/nif_vector_q/OTP-14598' into maintJohn Högberg
OTP-14520
2017-09-05erts: Add erlang:iolist_to_iovecLukas Larsson
OTP-14520
2017-09-05Merge branch 'maint'Rickard Green
* maint: Bug fixes of statistics(wall_clock) and statistics(runtime) Conflicts: erts/emulator/beam/erl_time_sup.c
2017-09-05Merge branch 'rickard/statistics-time-fixes/OTP-14597/ERL-465' into maintRickard Green
* rickard/statistics-time-fixes/OTP-14597/ERL-465: Bug fixes of statistics(wall_clock) and statistics(runtime) Conflicts: erts/emulator/beam/erl_time_sup.c
2017-09-05erts: Add nif ioqLukas Larsson
2017-09-05Merge branch 'rickard/dist/OTP-14459'Rickard Green
* rickard/dist/OTP-14459: Fix setnode/3 and erts_net_message()
2017-09-05erts: Fix faulty ASSERT of table fixation counterSverker Eriksson
Cannot read fix->counter safely without table lock.
2017-09-04Fix setnode/3 and erts_net_message()Rickard Green
2017-09-04Bug fixes of statistics(wall_clock) and statistics(runtime)Rickard Green