From 92bd7d3e43b7142d991f15594d783c1031547df5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= Used when a process
A trace token flag (
A trace token flag (
Used when a process
Used when a process
Used when a process
Each process has a trace token, which can be empty or
not empty. When not empty, the trace token can be seen as
- the tuple
To start a sequential trace, the user must explicitly set the trace token in the process that will send the first message in a sequence.
@@ -306,9 +317,10 @@ TimeStamp = {Seconds, Milliseconds, Microseconds}On each Erlang node, a process can be set as the system tracer.
This process will receive trace messages each time
a message with a trace token is sent or received (if the trace
- token flag
The system tracer only receives those trace events that
occur locally within the Erlang node. To get the whole picture
@@ -322,10 +334,9 @@ TimeStamp = {Seconds, Milliseconds, Microseconds}
Each process has a current trace token. Initially, the token is
- empty. When the process sends a message to another process, a
- copy of the current token is sent "invisibly" along with
- the message. Each process has a current trace token, which is copied from the process
+ that spawned it. When a process sends a message to another process, a
+ copy of the current token is sent "invisibly" along with the message. The current token of a process is set in one of the following two
ways: The algorithm for updating Let each process have two counters,
@@ -354,8 +365,9 @@ TimeStamp = {Seconds, Milliseconds, Microseconds}
When the process is about to send a message and the trace token
@@ -369,6 +381,16 @@ tcurr := curr_cnt
The trace token with
When the process is about to spawn another process and the trace + token is not empty.
+The counters of the parent process are updated in the same way as + for send above. The trace token is then passed to the child process, + whose counters will be set as follows:
+
+curr_cnt := tcurr
+prev_cnt := tcurr
+ When the process calls The code that creates a process that runs this tracer function
and sets that process as the system tracer can look like this:
--
cgit v1.2.3