Age | Commit message (Collapse) | Author |
|
|
|
* sverker/ets-delete-tree-trapping:
erts: Refactor ets catree deletion
|
|
Optimize continuation pointer management
|
|
The `move_call` instructions are combinations of a `move` instruction
and a `call` instruction. As currently implemented, the `move` part of
the instruction is executed in its entirety before the `call` part is
even started. The reason is that the C compiler cannot see that it
would be safe to read the target address of the call before writing to
the move destination.
Rewrite the instructions to explicitly read both the source for the
move and the target address for the call before writing the
destination of the move.
Micro-benchmarks show a small but consistent speed-up after this
change.
|
|
Eliminating the CP register and putting continuation
pointers directly on the stack made the deallocate_return
instruction slower.
Try to mitigate this slow down by specializing deallocate_return
for small stack. For the move_deallocate_return instruction,
reorder instructions to make it possible to execute the read
instructions in parallel.
|
|
The BEAM instructions for calling a function don't save the
continuation pointer (return address) on the stack, but to a special
BEAM register called CP. It is the responsibility of the called
function to save CP to the stack frame before calling other functions.
In the earlier implementations of BEAM on Sparc, CP was located in a
CPU register. That meant that the continuation pointer was never
written to memory when calling simple functions that didn't call
other functions at all or ended in a tail-call to another function.
The modern BEAM no longer keeps CP in CPU register. Instead, it is
kept in the `process` struct (in `p->cp`). That means the continuation
pointer must be written to the memory on every call, and if the called
function will call other functions, it will must read the continuation
pointer from `p->cp` and store it on the stack.
This commit eliminates the concept of the CP register and modifies
the call instructions to directly store the continuation pointer on
the stack. That makes allocation and trimming of stack frames slightly
faster. A more important benefit is simplification of code that handles
continuation pointers. Because all continuation pointers are now stored
on the stack, the special case of handling `p->cp` disappears.
Co-authored-by: John Högberg <[email protected]>
|
|
* maint:
erts: Scan heap fragments for off-heap binaries
|
|
* john/erts/process_info-binary-heap-fragments/OTP-15978:
erts: Scan heap fragments for off-heap binaries
|
|
to maintain consistency of the trees during yielding
and by that avoid problems with test inspection like
erts_debug:get_internal_state(node_and_dist_references).
|
|
* maint:
erts: Fix crash in instrument:allocations/0-1
|
|
* john/erts/fix-instrument-allocations-race/OTP-15983:
erts: Fix crash in instrument:allocations/0-1
|
|
* maint:
erts: Create heap binaries in binary:split/2-3
erts: Create heap binaries in binary_part/2-3
erts: Create heap binaries in split_binary/2
erts: Create heap binaries in bs_get_binary2
erts: Remove size check in bs_start_match
erts: Disallow binaries whose size in bits exceeds UWORD_MAX
|
|
* john/erts/bs_get_binary2-heap-binaries/OTP-15977:
erts: Create heap binaries in binary:split/2-3
erts: Create heap binaries in binary_part/2-3
erts: Create heap binaries in split_binary/2
erts: Create heap binaries in bs_get_binary2
erts: Remove size check in bs_start_match
erts: Disallow binaries whose size in bits exceeds UWORD_MAX
|
|
The current carrier list was read when the allocator wasn't locked,
crashing the emulator if a block scan raced with a carrier
allocation.
|
|
|
|
|
|
|
|
|
|
ErlSubBin is a large struct that often dwarfs the region of memory
it points at, and it's common for them to refer to a ProcBin which
must be kept around as long as the SubBin lives, using up even more
heap space and keeping the referenced binary alive regardless of
how small the sub-binary is.
|
|
The size check is redundant now that all binaries are guaranteed
to be small enough that their size in bits fits into a word.
|
|
These have never worked in binary matching (including sub-binaries
extracted from them) so it's hard to justify their existence. They
also make a future migration of binary sizes from bytes to bits
problematic, so we may as well change it ahead of time.
This is potentially incompatible on 32-bit platforms where a NIF
or driver could allocate 512MB+ binaries, but allocations that
large should be expected to fail anyway.
|
|
* maint:
erts: Escape atoms in erlang:fun_to_list/1
|
|
|
|
The test case alters the return value of a function that the
compiler expects will never return, resulting in undefined
behavior.
Note that the debugger (which may change variables/return values)
is unaffected since the affected module is purged and "replaced"
with an interpreted variant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add a sleep to reduce the chance that process exit
has not been "processed" by the nif code.
Also increased the test case timetrap for the
sc_ctrl_proc_exit group of test cases.
OTP-15904
|
|
Rename some of the structures and callback functions
(socket -> esock).
OTP-15955
|
|
Renamed constants (defines): SOCKET_ -> ESOCK_
OTP-15955
|
|
The naming "convention" for "top" functions of the esock
nif module was: The API functions where called nif_<foo>
This function did basic checks and arg extraction and then
called the a function called n<foo>, which was the one doing
the actual work.
Unfortunately, och some platforms (AIX) these second names,
n<foo>, clashed with system functions.
So, in order to avoid this, the naming of second function
has been changed to esock_<foo>.
OTP-15955
|
|
OTP-15904
|
|
OTP-15904
|
|
If we are not allowe to change ('eopnotsupp') the socket
option 'dontroute' then we skip the test case.
OTP-15904
|
|
The socket acceptconn test case has been split into two,
one for UDP and one for TCP.
OTP-15904
|
|
* maint:
Fix etp-ets-tables
Fix node refc test for free processes hanging around
Enhanced node refc bookkeeping
Fix node container refc tests of ETS
Fix node refc test of external data
Node container refc test for persistent terms
Include persistent term storage in node/dist refc check
Fix node refc test for system message queue
|
|
* rickard/node-refc-tests-22:
Fix etp-ets-tables
Fix node refc test for free processes hanging around
Enhanced node refc bookkeeping
Fix node container refc tests of ETS
Fix node refc test of external data
Node container refc test for persistent terms
Include persistent term storage in node/dist refc check
Fix node refc test for system message queue
|
|
|
|
|
|
|
|
|
|
* rickard/node-refc-tests-21:
Node container refc test for persistent terms
Include persistent term storage in node/dist refc check
Fix node refc test for system message queue
|
|
|
|
|
|
* rickard/node-refc-tests-20:
Fix node refc test for system message queue
|