aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.h
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_process.h
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_process.h')
-rw-r--r--erts/emulator/beam/erl_process.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 3b593bce02..d52b072183 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -1483,6 +1483,8 @@ extern int erts_system_profile_ts_type;
#define SEQ_TRACE_SEND (1 << 0)
#define SEQ_TRACE_RECEIVE (1 << 1)
#define SEQ_TRACE_PRINT (1 << 2)
+/* (This three-bit gap contains the timestamp.) */
+#define SEQ_TRACE_SPAWN (1 << 6)
#define ERTS_SEQ_TRACE_FLAGS_TS_TYPE_SHIFT 3