Age | Commit message (Collapse) | Author |
|
* lukas/stdlib/maps_iterators/OTP-14012:
erts: Limit size of first iterator for hashmaps
Update primary bootstrap
Update preloaded modules
erts: Remove erts_internal:maps_to_list/2
stdlib: Make io_lib and io_lib_pretty use maps iterator
erts: Implement batching maps:iterator
erts: Implement maps path iterator
erts: Implement map iterator using a stack
stdlib: Introduce maps iterator API
Conflicts:
bootstrap/lib/stdlib/ebin/io_lib.beam
bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
erts/emulator/beam/bif.tab
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/erts_internal.beam
erts/preloaded/ebin/zlib.beam
|
|
|
|
This function is no longer needed as maps:iterator has
now been implemented.
|
|
This iterator implementation fetches multiple elements to
iterate over in one call to erts_internal:maps_next instead
of one at a time. This means that the memory usage will go
up for the iterator as we are buffering elements, but the
usage is still bounded.
In this implementation the max memory usage is 1000 words.
Using this approach makes the iterator as fast as using
maps:to_list, so maps:iterator/2 has been removed.
|
|
* sverker/async-auto-connect/OTP-14370: (37 commits)
Move new|abort_connection_id to erts_internal
Refactor erts_dsig_prepare argument dep(p)
Cleanup net_kernel
Improve connection aborting
Abort all pending connections if net_kernel terminates
erts: Put pending DistrEntry in separate list
Refactor auto_connect into an outline function
Remove unused ERTS_DSP_RWLOCK
fix erlang specs and preloaded
erts: Keep magic ref to DistEntry in net_kernel
Allow DistEntries in ETS
Remove faulty assert
erts: Transcode tuple fallbacks
erts: Ensure enc_term_int() always do progress
erl_interface: Add tuple fallback tests
erl_interface: Refactor ei_accept_SUITE
Add optimistic DFLAG_DIST_HOPEFULLY for pending connections
erts: Fix auto-connect toward erl_interface/jinterface
erts: Let send(_,_,[noconnect]) enqueue msg on pending connection.
Remove obsolete erlang:dgroup_leader
...
|
|
* maint:
Fix triggering of node monitors
Conflicts:
erts/emulator/beam/dist.c
|
|
* rickard/node-mon-proc-exit-race/OTP-14781:
Fix triggering of node monitors
|
|
Fix broken receive mark after an exception
OTP-14782
|
|
and drop _id suffix.
|
|
Don't need to be pointer-pointer
|
|
|
|
|
|
|
|
and abort_pending_connection into own utility function.
|
|
|
|
to make sure it's kept alive.
|
|
|
|
Send may have failed, port exit with dist_entry cleaned up
and then new pending connection with queued messages.
|
|
When finalizing outgoing distribution messages
we transcode them into using tuple fallbacks if the
receiver does not support bitstrings and export-funs.
This can only happen if the message was first encoded toward
a pending connection when the receiver was unknown.
It's an optimistic approach optmimized for modern beam nodes,
that expect real bitstrings and funs (since <R13).
Only erl_interface/jinterface lack this support.
|
|
even when reds <= 1
Removed micro optimization for first fun variable
to make things simpler.
|
|
to avoid tuple fallbacks for export funs and bitstrings.
ToDo: Re-encode if receiver turn out to be erl_interface/jinterface.
|
|
|
|
The least bad behavior I think:
* We cannot return 'noconnect' as caller might already have enqueued
monitor/link that never triggers.
* We cannot block waiting for connection as that can ruin latency
when 'noconnect' is used to avoid blocking auto-connect
(see gen_server and gen_statem).
But there might be users getting more cases of bad latency
waiting for a pendig connection, instead of a fast 'noconnect'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed distribution_SUITE:applied_monitor_node
as it seems to test apply of trapping BIF
and monitor_node does not trap anymore.
|
|
|
|
Break out from 'flags' into new dedicated 'connection_id'
just for simplicity.
Also changed flags to low bits
and that affected enif_binary_to_term.
|
|
and remove ugly encoding fallback as {fun, ...}
DFLAGS_NEW_FUN_TAGS has been supported by vm/erl_interface/jinterface
since R13 or even older.
Renamed test case obsolete_funs to term2bin_tuple_fallbacks
and removed test for {fun,...} fallback
and added missing test for bitstring fallback {Binary, Bits}.
|
|
|
|
|
|
Distribution flag DFLAG_UTF8_ATOMS is supported since R16
and mandatory since 20.0.
|
|
|
|
to handle "lookup without refc++" correctly
which was introduced in 4dcb2ae7810a507b701a30072b2f514cab7ebbdb.
When decrementing refc to zero (in try_delete or prepare_try_delete)
we must always wait thread progress to make sure no thread has done
lookup without refc++ and is just about to do refc++ and thereby revive
the DistEntry. That is, we wait for a potential other thread to either
do refc++ or drop its pointer to the DistEntry.
And if that other thread does refc++ (in erts_ref_dist_entry)
it must also do the extra refc++ for the scheduled pending delete.
|
|
|
|
Add 'used' option for binary_to_term/2
|
|
HiPE: Support for literal tag, tests and bugfixes
|
|
When a ref is created before performing a receive that will only
receive message containing that ref, there is a compiler optimization
to avoid scanning messages that can't possible contain the newly
created ref.
Magnus Lång pointed out that the implementation of the optimization
is flawed. Exceptions or recursive calls could cause the receive
operation to scan the receive queue from a position beyond the expected
message (that is, the message containing the ref would never be
matched out). See the receive_opt_exception/1 and receive_opt_recursion/1
test cases in receive_SUITE.
It turns out that we can simplify the implementation of the
optimization while fixing the bug (suggested by Magnus Lång). We
actually don't need the c_p->msg.mark field. It is enough to have
c_p->msg.saved_pos; if it is non-zero, it is a valid position in the
message qeueue. All we need to do is to ensure that we clear
c_p->msg.saved_pos when a receive is exited normally or abnormally.
We can clear c_p->msg.saved_pos in JOIN_MESSAGE(), since it is called
both when leaving a receive because a message matched and because there
was a timeout and the 'after' clause was executed. In addition, we
need to clear c_p->msg.saved_pos when an exception is caught.
https://bugs.erlang.org/browse/ERL-511
|
|
Add internal documentation for the beam_makeops script
OTP-14626
|
|
The 's' operand overloads the tags for pids and ports to represent
X and Y registers, respectively. At load time, refuse to load the
module if the "literal" term is not a pid or port, as it would be
interpreted as a register.
This does not happen with normally compiled code, but it can happen
if the compiler (or beam_asm) is abused like in the following example:
make_bad() ->
Pid = self(),
Forms = [{attribute, 0, module, bad_s_operand},
{attribute, 0, export, [{test, 0}]},
{function, 0, test, 0,
[{clause, 0, [], [],
[{call,0,{atom,0,tuple_size},[{integer, 0, Pid}]}]}]}],
{ok, Module, Bin} = compile:forms(Forms, [no_copt,no_postopt,report_errors]),
code:load_binary(Module, "bad_s_operand.erl", Bin).
With this commit applied, the following message will be printed
when make_bad() is run:
=ERROR REPORT==== 10-Nov-2017::14:47:59 ===
Loading of bad_s_operand.erl failed: badfile
=ERROR REPORT==== 10-Nov-2017::14:47:59 ===
beam/beam_load.c(2396): Error loading function bad_s_operand:test/0: op bif1_body: bsd:
the term '<0.60.0>' would be confused with a register
|
|
* maint:
Updated OTP version
Update release notes
Update version numbers
inets: Prepare for release
inets: Add missing guard
Avoid WindowBits=8 as per the manual
Fix deflateParams on zlib 1.2.11
Ignore empty binaries in enif_inspect_iovec
Emasculate writable binaries on entering an iovec
Only apply EOS behaviors if there's pending data
Conflicts:
OTP_VERSION
|
|
* maint-20:
Updated OTP version
Update release notes
Update version numbers
inets: Prepare for release
inets: Add missing guard
Avoid WindowBits=8 as per the manual
Fix deflateParams on zlib 1.2.11
Ignore empty binaries in enif_inspect_iovec
Emasculate writable binaries on entering an iovec
Only apply EOS behaviors if there's pending data
Stop assuming that all schedulers are managed when updating msacc
|
|
* john/erts/msacc-dirty-schedulers/OTP-14707:
Stop assuming that all schedulers are managed when updating msacc
|
|
* sverker/systask-reqid-bug:
erts: Fix bug in systask scheduling
|
|
* sverker/systask-reqid-bug:
erts: Fix bug in systask scheduling
|
|
|