diff options
author | Björn Gustavsson <[email protected]> | 2014-03-07 10:41:32 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-03-20 13:10:36 +0100 |
commit | 9327904dcbf2708823c05baa7532783fb0214792 (patch) | |
tree | d5f157e885b0ccdbe63f95173df72425f1a9d468 /lib/stdlib | |
parent | 544fb141916d8676bc763318074e4d0783414af1 (diff) | |
download | otp-9327904dcbf2708823c05baa7532783fb0214792.tar.gz otp-9327904dcbf2708823c05baa7532783fb0214792.tar.bz2 otp-9327904dcbf2708823c05baa7532783fb0214792.zip |
Teach the call_time trace to notice when the trace dies (non-SMP system)
The call_time trace is a special kind of tracing that requires
a tracer process just like ordinary call trace, but it never
actually sends anything to the tracer. It merely use the existence
of a trace process (and call trace flags) as an indication that
call_time tracing is active for the process.
If the tracer dies in a non-SMP run-time system, processes with
call_time tracing would not notice that the tracer had
died. Furthermore, if the set_on_spawn flag was active, the dead
tracer could be propagaged to newly spawned processes.
Before accumulating trace information in a non-SMP system, always
validate the tracer process. (In an SMP system, a reference to a
dead tracer will be cleared away each time a process is scheduled.)
While we could put all of the new code beam_bp.c, we have chosen to
make a function call from beam_bp.c to a function in erl_trace.c for
clarity's sake and to ease further maintenance. In the future, we
might want to handle tracing in more similar ways in the SMP and
non-SMP system.
Diffstat (limited to 'lib/stdlib')
0 files changed, 0 insertions, 0 deletions