Age | Commit message (Collapse) | Author |
|
The hybrid heap emulator was last working in the non-SMP R11B
run-time system. When the constant pools were introduced in R12B,
the hybrid heap emulator was not updated to handle them.
At this point, the harm from reduced readability of the code is
greater than any potential usefulness of keeping the code.
|
|
|
|
It seems useful to be able to filter out (for example) just
the global calls.
|
|
|
|
|
|
|
|
|
|
|
|
User tags in a dynamic trace enabled VM are spread throughout the system
in the same way as seq_trace tokens. This is used by the file module
and various other modules to get hold of the tag from the user process
without changing the protocol.
|
|
|
|
Add probes to the virtual machine, except (mostly) the efile_drv.c
driver and other file I/O-related source files.
|
|
* bjorn/deprecate-tuple-funs/OTP-9649:
erts: Warn the first time a tuple fun is called
otp_mibs: Eliminate use of tuple fun
os_mon: Eliminate use of tuple fun
asn1: Eliminate use of tuple fun
parsetools: Eliminate use of tuple fun
mnesia tests: Eliminate use of tuple fun
snmp: Eliminate use of tuple fun
wrap_log_reader_SUITE: Eliminate use of tuple fun
big_SUITE: Eliminate use of tuple fun
file_SUITE: Eliminate use of tuple fun
fprof: Eliminate use of tuple fun
xref_compiler: Eliminate use of tuple fun
shell: Eliminate use of tuple funs
erl_eval: Eliminate use of tuple funs
user_sup: Eliminate use of tuple fun
|
|
|
|
|
|
gcc don't care about the type, but clang does and will issue
a warning.
|
|
* pan/binary_match_scope/OTP-9701:
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Remove GCC 4.6 set-but-not-used warning from erl_bif_binary
Make binary:match with scope return correct values
|
|
No semantic change, just code clarification.
Use unique macro names instead of redefining the original ones.
|
|
|
|
* rickard/thr-progress-block/OTP-9631:
Replace system block with thread progress block
|
|
The ERTS internal system block functionality has been replaced by
new functionality for blocking the system. The old system block
functionality had contention issues and complexity issues. The
new functionality piggy-backs on thread progress tracking functionality
needed by newly introduced lock-free synchronization in the runtime
system. When the functionality for blocking the system isn't used
there is more or less no overhead at all. This since the functionality
for tracking thread progress is there and needed anyway.
|
|
For cleanliness, store the trap address in p->i instead of in
p->def_arg_reg[3].
|
|
Store arguments for a trap in the X register array to allow
traps to have any number of arguments.
|
|
Taking advantage of the new calling convention for BIFs, we
only need one instruction to handle BIFs with any number of
arguments. This change eliminates the limit of three arguments
for BIFs, but traps are still limited to three arguments.
|
|
The current calling convention for BIFs makes it necessary to
handle each arity specially, since each argument for the BIF
also becomes an argument for the C function implementing the BIF,
which makes it hard to allow BIFs with any number of arguments.
Change the calling convention for BIFs, so that BIF arguments are
passed in an array to the C function implementing the BIF.
|
|
As a preparation for changing the calling convention for
BIFs, make sure that all BIFs use the macros. Also, eliminate
all calls from one BIF to another, since that also breaks
the calling convention abstraction.
|
|
* bjorn/unicode-noncharacters/OTP-9624:
Allow noncharacter code points in unicode encoding and decoding
|
|
The two noncharacter code points 16#FFFE and 16#FFFF were not
allowed to be encoded or decoded using the unicode module or
bit syntax. That causes an inconsistency, since the noncharacters
16#FDD0 to 16#FDEF could be encoded/decoded.
There is two ways to fix that inconsistency.
We have chosen to allow 16#FFFE and 16#FFFF to be encoded and
decoded, because the noncharacters could be useful internally
within an application and it will make encoding and decoding
slightly faster.
Reported-by: Alisdair Sullivan
|
|
In the handling of generic instructions, we used to always
test whether the instruction was 'too_old_compiler' and abort
loading with a special error message.
Refactor the code so that we only do test if we an error
has occurred. That will allow us to make the test more expensive
in the future, allowing us to customize error messages for certain
opcode without any cost in the successful case.
|
|
The hybrid-heap emulator is broken since R12, so there is no
need to keep those instructions.
|
|
In the half-word emulator, smp emulator, and non-smp emulator
the X register and float register arrays were allocated in
different ways.
Always allocate the registers and store the pointers to the
allocated register arrays in the scheduler data.
|
|
Put the actual saving of the continuation pointers on the stack
in the new function erts_save_stacktrace() so that it can be reused.
The code is too tricky and complicated to allow it to
become duplicated.
|
|
|
|
As a preparation for providing information about the source
location for an MFA item in an exception stacktrace, refactor
the code that builds the exception stacktrace. Basically we
need two passes over the saved continuation counters: a first
pass to calculate the needed heap space and a second pass to
actually build the stacktrace.
|
|
This commit is a preparation for introducing location information
(filename/line number) in stacktraces in exceptions. Currently
a stack trace looks like:
[{Mod1,Function1,Arity1},
.
.
.
{ModN,FunctionN,ArityN}]
Add a forth element to each tuple that can be used indication
the filename and line number of the source file:
[{Mod1,Function1,Arity1,Location1},
.
.
.
{ModN,FunctionN,ArityN,LocationN}]
In this commit, the fourth element will just be an empty list,
and we will change all code that look at or manipulate stacktraces.
|
|
Introduce the line/1 instruction in the compiler and the BEAM
virtual machine. It will not yet be generated by the compiler and
will not actually carry any information.
|
|
Attempting to construct <<0:((1 bsl 32)-1)>>, the largest bitstring
allowed in a 32 bit emulator, would cause an emulator crash because
of integer overflow.
Fix the problem by using an Uint64 to avoid integer overflow.
Do not attempt to handle construction of <<0:((1 bsl 64)-1>> in
a 64-bit emulator, because that will certainly cause the emulator
to terminate anyway because of insufficient memory.
|
|
* rickard/barriers/OTP-9281:
Silence warnings
Fix build with hipe on amd64
Reduce number of atomic ops
Use 32-bit atomic for port snapshot
Remove pointless erts_ports_alive variable
Ensure quick break
Ensure that all rehashing information are seen when done
Ensure that stack updates are seen when stack is released
Add needed barriers for write_concurrency tables
Homogenize memory barriers on atomics
|
|
|
|
|
|
Conflicts:
erts/vsn.mk
|
|
Fix thread unsafe access to process status field introduced in OTP-9125.
|
|
The status of a process was unnecessarily set to waiting before
the process was enqueued in a run queue. This bug was harmless
up until OTP-R14B01. In OTP-R14B02 erlang:hibernate/3 was fixed
(OTP-9125). After the introduction of OTP-9125, the previously
harmless process status bug sometimes caused erroneous badarg
exceptions from process_info().
|
|
Calling a BIF thaf is called as a function (such as process_info/{1,2})
would leave a non-zero value in c_p->cp, which would lead to
duplicate entries in the stacktrace.
|
|
* pg/fix-hibernate-with-hipe:
Update copyright years
Fix NULL-free bug in hibernate on debug emulator
Fix several bugs related to hibernate/3 and HiPE
Conflicts:
erts/emulator/test/hibernate_SUITE.erl
OTP-9125
|
|
The call_fun() function in the BEAM emulator is supposed to
to put the fun term in the x register following the actual arguments
and environment for the fun. But if the fun is not loaded and
a call to the error_handler:undefined_lambda/3 function is set up,
the x(3) register will not be initialized.
The lack of initialization is very unlikely to cause a problem
in practice, because all of the following things must happen:
1) An unloaded fun must be called (i.e. the fun must have
been received from another node or from a file or dets table).
2) The process must be scheduled out before the call to the
error_handler:undefined_lambda/3 function can take place.
3) The process must be garbage collected before the process
is scheduled in.
4) The x(3) register must contain a stale cons or box pointer
that happens to point into the the heap of the currently
executing process. (Because of the literal pool, the GC will
never copy anything that is outside of the heap.)
I was not able to write a test case that would force an
emulator crash.
|
|
* pan/halfword-tmp-heap-fixes/OTP-8332:
Fix assymetric (Un)UseTmpHeap in erl_process.c
Conflicts:
erts/emulator/beam/beam_emu.c
|
|
* rickard/temp_alloc_check/OTP-9028:
Verify that temp allocated memory is released
|
|
The halfword emulator used to require special handling,
but no longer does.
|
|
It is not necessary to decrement I, because an exception is
about to be generated. Furthermore, I pointing *before* the
instruction that caused the exception may cause problems in
the future.
|
|
|