aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-03-19 17:39:14 +0100
committerJohn Högberg <[email protected]>2019-03-21 16:25:32 +0100
commit2f75782815441a161e6157c941b7f482f96bdbcb (patch)
tree1636fd286073f1fe669a9e3f6a477e23c62ea9bc /erts/emulator/beam/erl_nif.c
parent92bd7d3e43b7142d991f15594d783c1031547df5 (diff)
downloadotp-2f75782815441a161e6157c941b7f482f96bdbcb.tar.gz
otp-2f75782815441a161e6157c941b7f482f96bdbcb.tar.bz2
otp-2f75782815441a161e6157c941b7f482f96bdbcb.zip
seq_trace: Inherit trace token on spawn
Trace tokens can be lost when a process delegates message sending to a child process, which is pretty surprising and limits the usefulness of seq tracing. One example of this is gen_statem:call/4 which uses a child process to implement timeouts without the risk of a late message arriving to the caller. This commit attempts to remedy this by propagating the trace token to spawned processes, and adds optional tracing for process spawning as well.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index af1acbfc90..4b4573d2f9 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -815,7 +815,7 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid,
}
#endif
if (have_seqtrace(stoken)) {
- seq_trace_update_send(c_p);
+ seq_trace_update_serial(c_p);
seq_trace_output(stoken, msg, SEQ_TRACE_SEND,
rp->common.id, c_p);
}