Age | Commit message (Collapse) | Author |
|
Use cerl:make_list/1 instead of a home-made make_list/1 to ensure that
literal lists are constructed as literals. In a future release, we
would like to forbid in the loader construction of literal lists using
instructions like:
put_list {atom,a} [] Dst
The proper way is:
move {literal,[a]} {x,0}
Also update the comment about "put_list Const [] Dst" in ops.tab.
|
|
In 1f0ae04d374, a complete register map was introduced in the %live
instructions thar are added by beam_utils:live_opt/1.
Use the register map to improve beam_utils:is_killed_block/2.
|
|
|
|
beam_jump fails to optimize the following:
jump 2
label 1
label 2
Since this situation is rare, instead of complicating beam_jump,
add the optimization to beam_peep. It will always succeed, since
adjacent labels have been coalesced.
|
|
* bjorn/raise:
Remove unreachable code after 'raise' instructions
Simplify the raise instruction to reduce code size
|
|
* egil/erts/fix-process_info-spec/ERL-123/OTP-13485:
Update preloaded erlang.beam
erts: Fix process_info/2 result spec
|
|
* egil/erts/cuddle-tests:
Additional logging for alloc_SUITE
Replace test_server:os_type/0 with os:type/0
Let low_prio test run a bit longer
Increase timetrap for atom_roundtrip_r15b
Remove unnecessary ct boilerplate in suite
Don't divide by zero in test logging
Use ct:fail/1 instead of test_server:fail/1
Relax node_container_SUITE
Increase timetrap timeout for op_SUITE:bsl_bsr/1
Increase timetrap timeout for port_SUITE:huge_env/1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove the unreachable instructions after a 'raise' instruction
(e.g. a 'jump' or 'deallocate', 'return') to decrease code size.
|
|
The raise/2 instruction is almost always used like this:
raise x(2) x(1)
Therefore, we can translate it to an internal i_raise/0
instruction that uses x(2) x(1) as its implicit operands.
We will also remove the backward compatibility with R10-0. It is
unlikely that anyone still is using BEAM files compiled with the R10-0
compiler, especially since most of those modules cannot be loaded. The
loader will refuse to load any module that uses the old non-GCIng
arithmetic instructions or the non-GCing versions of length/1 or
size/1.
Doing these changes will reduce both the size of the loaded BEAM
code and size of the code in process_main().
|
|
|
|
|
|
|
|
|
|
* egil/fix-erl_interface-tests:
Remove forgotten line
|
|
|
|
|
|
|
|
* bjorn/erts/huge-file-fix/OTP-13461:
Handle multi-giga byte writes to files
|
|
* bjorn/kernel/rpc-pinfo/ERL-124/OTP-13460:
Update spec for rpc:pinfo/2
|
|
rpc:pinfo/2 is documented as a location-transparent version
of process_info/2. Therefore, it should be expected that
the spec would allow calls with an item list, for example:
rpc:pinfo(Pid, [initial_call,last_calls])
Report-URL: http://bugs.erlang.org/browse/ERL-124
Reported-by: bjfish
|
|
* bjorn/erts/beam_load:
Eliminate unnecessary renaming of bs_put_utf16/3
Don't let the loader do the compiler's job
Remove unused variables after code generation
Avoid rebuilding unchanged instructions
Introduce a 'rename' instruction
Simplify window management for the transformation engine
Eliminate allocation of variables in transform_engine()
Refactor calls to transform_engine()
ops.tab: Remove useless transformation
|
|
There is no reason to rename bs_put_utf16/3.
(We rename instructions if we'll need to change the operands or
if we will need to avoid an endless transformation loop. Neither
of these reasons apply to bs_put_utf16/3.)
|
|
Optimizations that are possible to do by the compiler should be
done by the compiler and not by the loader.
If the compiler has done its job correctly, attempting to do the two
transformations only wastes time.
|
|
The removal of instructions on the left side of a transformation
is done while generating the code for the left side.
Postpone removal of unused variables to a later, separate passes to
allow more variables to be eliminated after the optimizations
passes introduced in the previous commits.
|
|
In transformations such as:
move S X0=x==0 | line Loc | call_ext Ar Func => \
line Loc | move S X0 | call_ext Ar Func
we can avoid rebuilding the last instruction in the sequence
by introducing a 'keep' instruction.
Currently, there are only 13 transformations that are hit by
this optimization, but most of them are frequently used.
|
|
Introduce a 'rename' instruction that can be used to optimize
simple renaming with unchanged operands such as:
get_tuple_element Reg P Dst => i_get_tuple_element Reg P Dst
By allowing it to lower the arity of instruction, transformations
such as the following can be handled:
trim N Remaining => i_trim N
All in all, currently 67 transformations can be optimized in this
way, including some commonly used ones.
|
|
Generic instructions have a min_window field. Its purpose is to
avoid calling transform_engine() when there are too few instructions
in the current "transformation window" for a transformation to
succeed.
Currently it does not do much good since the window size will be
decremented by one before being used. The reason for the subtraction
is probably that in some circumstances in the past, the loader could
read past the end of the BEAM module while attempting to fetch
instructions to increase the window size. Therefore, it would not
be safe to just remove the subtraction by one.
The simplest and safest solution seems to always ensure that there
are always at least TWO instructions when calling transform_engine().
That will be safe, as long as a BEAM module is always finished with
an int_code_end/0 that is not involved in any transformation.
|
|
When an instruction with a variable number operands (such as
select_val) is seen of the left side of a transformation, the
'next_arg' instruction will allocate a buffer to fit all variables and
all operands will be copied into the buffer. Very often, the 'commit'
instruction will never be reached because of a test or predicate
failing or because of a short window; in that case, the variable
buffer will be deallocated.
Note that originally there were only few instructions with a variable
number of operands, but now common operations such as tuple building
also have a variable number of operands.
To avoid those frequent allocations and deallocations, modify the
'next_arg' instruction to only save a pointer to the first of the
"rest" arguments. Also move the deallocation of the instructions
on the left side from the 'commit' instruction to the 'end'
instruction to ensure that 'store_rest_args' will still work.
|
|
|
|
* RicoAntonioFelix/patch-1/PR-1003:
Update INSTALL.md
|
|
* derek121/mention_intellij_plugin/PR-970:
Add mention of IntelliJ plugin
|
|
* derek121/supervisor_docs/PR-974:
Fix small supervisor docs grammar issue
|
|
* minostro/maint/PR-986:
Fix typo in funs programming examples document
|
|
* egil/erts/tracing-beam-lttng/OTP-10282:
erts: Don't use ratio in carrier lttng tracepoints
Add lttng testcases
erts: Extend erlang:system_info/1 with lttng
Refactor and fix dtrace define in erl_message
erts: Add lttng tracepoints for async pool queue
erts: Add lttng tracepoints for drivers
erts: Add lttng tracepoints for scheduler events
erts: Add lttng tracepoints for memory carriers
erts: Update lttng-wrapper with mfa conversion
erts: Teach lttng to configure and build system
|
|
|
|
|
|
Let erlang:system_info(dynamic_trace) be able to return 'lttng' if enabled.
|
|
|
|
* aio_pool_get
* aio_pool_add
|
|
* driver_event
* driver_flush
* driver_finish
* driver_init
* driver_output
* driver_outputv
* driver_process_exit
* driver_ready_async
* driver_ready_input
* driver_ready_output
* driver_start
* driver_stop
* driver_stop_select
* driver_timeout
|
|
* scheduler_poll
|
|
* carrier_create
* carrier_destroy
* carrier_pool_put
* carrier_pool_get
|
|
|
|
Introduce a wrapper API for lttng.
|