Age | Commit message (Collapse) | Author |
|
This is needed as otherwise messages from system_profile
will not be guaranteed to arrive before trace delivered.
|
|
|
|
Any heap fragment created during a nif call to a tracer nif
should be free'd immediately in order for the GC not to treat
it as live data.
|
|
OTP-13497
This trace event is triggered when a process is created from the
process that is created.
|
|
Rickards said that this was ok
|
|
We have the main lock on rp->p, so why not?
|
|
provoked by nif_SUITE:nif_binary_to_term.
If we fail to decode an immediate (unsafe atom for example) with
a dummy factory then hp and factory->hp will both be uninitialized
and valgrind will complain about comparing them.
|
|
erts_block/unblock_fpe should only be called at entry to/exit from
native user code.
|
|
This commit completes the tracing for processes so that
all messages sent by a process (via nifs or otherwise) will
be traced.
The commit also adds tracing of all types of events from ports.
When enabling tracing using erlang:trace, the 'all' flag now also
enables tracing on all ports.
OTP-13496
|
|
Add the possibility to use modules as trace data receivers. The functions
in the module have to be nifs as otherwise complex trace probes will be
very hard to handle (complex means trace probes for ports for example).
This commit changes the way that the ptab->tracer field works from always
being an immediate, to now be NIL if no tracer is present or else be
the tuple {TracerModule, TracerState} where TracerModule is an atom that
is later used to lookup the appropriate tracer callbacks to call and
TracerState is just passed to the tracer callback. The default process and
port tracers have been rewritten to use the new API.
This commit also changes the order which trace messages are delivered to the
potential tracer process. Any enif_send done in a tracer module may be delayed
indefinitely because of lock order issues. If a message is delayed any other
trace message send from that process is also delayed so that order is preserved
for each traced entity. This means that for some trace events (i.e. send/receive)
the events may come in an unintuitive order (receive before send) to the
trace receiver. Timestamps are taken when the trace message is generated so
trace messages from differented processes may arrive with the timestamp
out of order.
Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer
module tracers and also the backwards compatible arguments.
OTP-10267
|
|
These are convinience functions for calling nifs from erts
|
|
|
|
* lukas/erts/enif_send_null_env/OTP-13495:
erts: Add enif_send with NULL as msg env
|
|
* egil/erts/fix-erlang-system_profile/ERL-126/OTP-13494:
erts: Enhance system_profile tests
erts: Don't use function location when process is terminating
|
|
|
|
|
|
* egil/erts/opt-list_append/OTP-13487:
erts: Optimize '++' operator
|
|
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
|
|
This also optimizes the BIF lists:append/2
Use one pass to check for properness and copying LHS list.
If LHS turns out not being a proper list, bail and reset htop.
If we run out of heap, allocate a heap-fragment and calculate
the remaining length as normal, thus checking for properness,
and then continue copying.
Measurements shows this being ~50% faster.
|
|
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().
|
|
to let future nodes know that we can handle
NEW_PID_EXT, NEW_PORT_EXT and NEWER_REFERENCE_EXT.
|
|
from future nodes.
|
|
Instead of INTERNAL_CREATION (255), use empty atom for node name
to mean the local node (regardless of node name or creation).
The purpose is to get rid of special value 255, for future expansion
of creation to 32-bit.
|
|
|
|
* 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.
|
|
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.
|
|
This is an optimization for reducing the number of heap fragments
allocated when sending a message where the majority of the
message payload is on the sending process' heap.
|
|
* 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.
|
|
We used to set last_op_next and last_op to NULL just in case.
Setting last_op_next to causes a rescan of the instructions
to find the last instruction in the chain, so we would want
to avoid that unless really necessary.
|
|
The transformation on the following line will do the job.
|
|
=== OTP-18.3.1 ===
Changed Applications:
- erts-7.3.1
- inets-6.2.1
- mnesia-4.13.4
Unchanged Applications:
- asn1-4.0.2
- common_test-1.12
- compiler-6.0.3
- cosEvent-2.2
- cosEventDomain-1.2
- cosFileTransfer-1.2
- cosNotification-1.2.1
- cosProperty-1.2
- cosTime-1.2.1
- cosTransactions-1.3.1
- crypto-3.6.3
- debugger-4.1.2
- dialyzer-2.9
- diameter-1.11.2
- edoc-0.7.18
- eldap-1.2.1
- erl_docgen-0.4.2
- erl_interface-3.8.2
- et-1.5.1
- eunit-2.2.13
- gs-1.6
- hipe-3.15
- ic-4.4
- jinterface-1.6.1
- kernel-4.2
- megaco-3.18
- observer-2.1.2
- odbc-2.11.1
- orber-3.8.1
- os_mon-2.4
- ose-1.1
- otp_mibs-1.1
- parsetools-2.1.1
- percept-0.8.11
- public_key-1.1.1
- reltool-0.7
- runtime_tools-1.9.3
- sasl-2.7
- snmp-5.2.2
- ssh-4.2.2
- ssl-7.3
- stdlib-2.8
- syntax_tools-1.7
- test_server-3.10
- tools-2.8.3
- typer-0.9.10
- webtool-0.9.1
- wx-1.6.1
- xmerl-1.3.10
Conflicts:
OTP_VERSION
erts/emulator/test/save_calls_SUITE.erl
erts/vsn.mk
|
|
* bjorn/erts/clang-opt:
Fix unsafe transformation of apply/3 with fixed arguments
|
|
* egil/erts/fix-flatmap-get/OTP-13459:
erts: Don't search for non-existing Map keys twice
|
|
* sverker/erts/trap_exit-race/OTP-13452:
erts: Fix race for process_flag(trap_exit,true)
|