diff options
author | Lukas Larsson <[email protected]> | 2016-02-08 18:31:43 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-04-15 15:06:53 +0200 |
commit | 6cb6b59cd4cd5bd4383053e12ae8ab192711c827 (patch) | |
tree | 8fae3033130b776df85625accb0cd4328d72bde3 /erts/emulator/beam/register.c | |
parent | 37092dab15448ef6a078800e3ff0cc41880ea765 (diff) | |
download | otp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.tar.gz otp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.tar.bz2 otp-6cb6b59cd4cd5bd4383053e12ae8ab192711c827.zip |
erts: Extend process and port tracing
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
Diffstat (limited to 'erts/emulator/beam/register.c')
-rw-r--r-- | erts/emulator/beam/register.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/beam/register.c b/erts/emulator/beam/register.c index f4a889b8f8..e995dcbd8a 100644 --- a/erts/emulator/beam/register.c +++ b/erts/emulator/beam/register.c @@ -538,8 +538,12 @@ int erts_unregister_name(Process *c_p, ERTS_SMP_LC_ASSERT(erts_lc_is_port_locked(port)); rp->pt->common.u.alive.reg = NULL; - + if (IS_TRACED_FL(port, F_TRACE_PORTS)) { + if (current_c_p_locks) { + erts_smp_proc_unlock(c_p, current_c_p_locks); + current_c_p_locks = 0; + } trace_port(port, am_unregister, r.name); } |