diff options
author | Lukas Larsson <[email protected]> | 2016-05-11 11:16:16 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-05-11 16:48:37 +0200 |
commit | 3471d44a6a5ed5ab038c4cdc76b350119fe745e2 (patch) | |
tree | 629de2dea305b83ee00d685cffe6b8e9533eb7d7 /erts/preloaded | |
parent | 4aea719054a594a06aceb34afca0ea3df65ead77 (diff) | |
download | otp-3471d44a6a5ed5ab038c4cdc76b350119fe745e2.tar.gz otp-3471d44a6a5ed5ab038c4cdc76b350119fe745e2.tar.bz2 otp-3471d44a6a5ed5ab038c4cdc76b350119fe745e2.zip |
erts: Only allow remove from trace_status callback
Make it so that it is only possible to remove a tracer via
returning remove from an erl_tracer. This limition is put in
place in order to avoid a lot of lock checking and taking
in various places, especially in regards to trace events
happening on dirty schedulers.
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/src/erl_tracer.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/preloaded/src/erl_tracer.erl b/erts/preloaded/src/erl_tracer.erl index de1e9ca01e..fe15812535 100644 --- a/erts/preloaded/src/erl_tracer.erl +++ b/erts/preloaded/src/erl_tracer.erl @@ -41,10 +41,14 @@ on_load() -> %%% NIF placeholders %%% --spec enabled(Tag :: trace_tag() | seq_trace | trace_status, +-spec enabled(Tag :: trace_status, TracerState :: tracer_state(), Tracee :: tracee()) -> - trace | discard | remove. + trace | remove; + (Tag :: trace_tag() | seq_trace, + TracerState :: tracer_state(), + Tracee :: tracee()) -> + trace | discard. enabled(_, _, _) -> erlang:nif_error(nif_not_loaded). |