Age | Commit message (Collapse) | Author |
|
|
|
In the implementation of the zero-copying term storage, we
want to preserve sharing, but not copy literals because the
modules holding the literals could be unloaded under our feet.
|
|
|
|
|
|
Replace double pointer with return that can mostly be ignored.
Use restrict pointers.
|
|
|
|
|
|
to replace macro ERTS_INTERNAL_BINARY_FIELDS
as header in Binary and friends.
|
|
|
|
|
|
|
|
Magic references are *intentionally* indistinguishable from ordinary
references for the Erlang software. Magic references do not change
the language, and are intended as a pure runtime internal optimization.
An ordinary reference is typically used as a key in some table. A
magic reference has a direct pointer to a reference counted magic
binary. This makes it possible to implement various things without
having to do lookups in a table, but instead access the data directly.
Besides very fast lookups this can also improve scalability by
removing a potentially contended table. A couple of examples of
planned future usage of magic references are ETS table identifiers,
and BIF timer identifiers.
Besides future optimizations using magic references it should also
be possible to replace the exposed magic binary cludge with magic
references. That is, magic binaries that are exposed as empty
binaries to the Erlang software.
|
|
* maint:
Atomic reference count of binaries also in non-SMP
Conflicts:
erts/emulator/beam/erl_fun.c
|
|
NIF resources was not handled in a thread-safe manner in the runtime
system without SMP support.
As a consequence of this fix, the following driver functions are now
thread-safe also in the runtime system without SMP support:
- driver_free_binary()
- driver_realloc_binary()
- driver_binary_get_refc()
- driver_binary_inc_refc()
- driver_binary_dec_refc()
|
|
|
|
* Literals are not copied between processes for messages or spawn
Increases performance of message sent and processes spawned when
literals are involved in messages or arguments.
|
|
|
|
|
|
This is mostly a pure refactoring.
Except for the buggy cases when calling erlang:halt() with a positive
integer in the range -(INT_MIN+2) to -INT_MIN that got confused with
ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT.
Outcome OLD erl_exit(n, ) NEW erts_exit(n, )
------- ------------------- -------------------------------------------
exit(Status) n = -Status <= 0 n = Status >= 0
crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0
The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and
ERTS_DUMP_EXIT are the same as before (even though their values have
changed).
|
|
The TMPBUF option is no longer needed due to is_literal test and NONE
was only used for initial debugging. So we remove the entire option.
|
|
|
|
|
|
|
|
|
|
|
|
The Map implementation has changed since initial preserved copy implementation.
|
|
Halfword is no longer present in the runtime system.
|
|
The internal stacks has changed between releases.
|
|
|
|
This is very verbose, you have been warned.
It should work with the copy-spy.py script, which may be a bit outdated.
|
|
This commit is just for debugging purposes, will probably be reverted.
It comes with a the erts_debug:copy_shared/1 BIF. If SHCOPY_DISABLE
is defined, SHCOPY starts disabled and is dynamically enabled the first
time that the BIF is called.
|
|
Add functions size_shared, copy_shared_calculate and copy_shared_perform.
Add the infrastructure for making these communicate with each other.
Add debug information to other places in the VM, to watch interaction
with the sharing-preserving copy.
CAUTION: If you define the SHCOPY_DEBUG macro (after SHCOPY is actually
used in the VM) and make the whole OTP, there will be a lot of debugging
messages during make (it will also be enabled in erlc). You have been
warned...
|
|
* The youngest generation of the heap can now consist of multiple
blocks. Heap fragments and message fragments are added to the
youngest generation when needed without triggering a GC. After
a GC the youngest generation is contained in one single block.
* The off_heap_message_queue process flag has been added. When
enabled all message data in the queue is kept off heap. When
a message is selected from the queue, the message fragment (or
heap fragment) containing the actual message is attached to the
youngest generation. Messages stored off heap is not part of GC.
|
|
|
|
* ERTS_GET_BINARY_BYTES_REL
* ERTS_GET_REAL_BIN_REL
|
|
|
|
|
|
|
|
|
|
by adding a dynamic heap factory.
"binary_to_term" is now a hybrid solution with both
a call to decoded_size() to calculate needed heap space
AND possible dynamic allocation of more heap space
if needed for big maps.
The heap size returned from decoded_size() is guaranteed
to be sufficient for all term heap data except for hashmap
nodes. All hashmap nodes are created at the end of dec_term()
by invoking the heap factory interface that may allocate more
heap space on process heap or in fragments.
With this commit it is no longer guaranteed that a message
is confined to only one heap fragment.
|
|
There is no need to take special care of Maps at all since header_arity(hdr)
will take care of the normal case via its Map handling.
|
|
|
|
|
|
flatmap: Small map
hashmap: Large map
map: flatmap or hashmap
|
|
|
|
Conflicts:
erts/emulator/Makefile.in
erts/emulator/beam/bif.tab
erts/emulator/beam/erl_gc.c
erts/emulator/beam/erl_gc.h
erts/emulator/beam/erl_printf_term.c
erts/emulator/beam/erl_term.c
erts/emulator/beam/erl_term.h
|
|
|
|
* paulgray/dtrace_snprintf_fix/OTP-11816:
Pass full strings to DTrace probes
|
|
Whenever string is passed as an argument to a DTrace probe, its length
should be properly computed. Until now in order to get length of the
input buffer size_of(char *) was used - which evalutes to 4 or 8
(depending on the architecture). To get a proper length,
size_of(DTRACE_CHARBUF_NAME(buffer_name)) should be used.
|
|
|