aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erl_tracer.erl
diff options
context:
space:
mode:
Diffstat (limited to 'erts/preloaded/src/erl_tracer.erl')
-rw-r--r--erts/preloaded/src/erl_tracer.erl22
1 files changed, 14 insertions, 8 deletions
diff --git a/erts/preloaded/src/erl_tracer.erl b/erts/preloaded/src/erl_tracer.erl
index de1e9ca01e..c810069d17 100644
--- a/erts/preloaded/src/erl_tracer.erl
+++ b/erts/preloaded/src/erl_tracer.erl
@@ -1,6 +1,6 @@
-module(erl_tracer).
--export([enabled/3, trace/6, on_load/0]).
+-export([enabled/3, trace/5, on_load/0]).
-type tracee() :: port() | pid() | undefined.
@@ -26,9 +26,9 @@
| trace_tag_running_ports()
| trace_tag_gc().
--type trace_opts() :: #{ match_spec_result => true | term(),
- scheduler_id => undefined | non_neg_integer(),
- timestamp => undefined | timestamp | cpu_timestamp |
+-type trace_opts() :: #{ extra => term(), match_spec_result => term(),
+ scheduler_id => non_neg_integer(),
+ timestamp => timestamp | cpu_timestamp |
monotonic | strict_monotonic }.
-type tracer_state() :: term().
@@ -41,10 +41,17 @@ on_load() ->
%%% NIF placeholders
%%%
--spec enabled(Tag :: trace_tag() | seq_trace | trace_status,
+%% This suppression is needed as trace_tag gets collapsed to atom()
+-dialyzer({no_contracts, enabled/3}).
+
+-spec enabled(Tag :: trace_status,
+ TracerState :: tracer_state(),
+ Tracee :: tracee()) ->
+ trace | remove;
+ (Tag :: trace_tag() | seq_trace,
TracerState :: tracer_state(),
Tracee :: tracee()) ->
- trace | discard | remove.
+ trace | discard.
enabled(_, _, _) ->
erlang:nif_error(nif_not_loaded).
@@ -52,8 +59,7 @@ enabled(_, _, _) ->
TracerState :: tracer_state(),
Tracee :: tracee(),
Msg :: term(),
- Extra :: term(),
Opts :: trace_opts()) -> any().
-trace(_, _, _, _, _, _) ->
+trace(_, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).