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 /erts/emulator/beam/erl_trace.h | |
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 'erts/emulator/beam/erl_trace.h')
-rw-r--r-- | erts/emulator/beam/erl_trace.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_trace.h b/erts/emulator/beam/erl_trace.h index 853c6cb0d8..4f2c70d6e7 100644 --- a/erts/emulator/beam/erl_trace.h +++ b/erts/emulator/beam/erl_trace.h @@ -39,6 +39,7 @@ void erts_change_default_tracing(int setflags, Uint *flagsp, Eterm *tracerp); void erts_get_default_tracing(Uint *flagsp, Eterm *tracerp); void erts_set_system_monitor(Eterm monitor); Eterm erts_get_system_monitor(void); +int erts_is_tracer_proc_valid(Process* p); #ifdef ERTS_SMP void erts_check_my_tracer_proc(Process *); |