aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/bif.c14
-rw-r--r--erts/emulator/beam/bif.tab14
-rw-r--r--erts/emulator/beam/ops.tab74
-rw-r--r--erts/preloaded/ebin/prim_file.beambin38764 -> 40672 bytes
-rw-r--r--erts/preloaded/src/prim_file.erl22
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl70
-rw-r--r--lib/kernel/src/file.erl4
-rw-r--r--lib/kernel/src/file_io_server.erl6
-rw-r--r--lib/runtime_tools/src/dyntrace.erl42
9 files changed, 123 insertions, 123 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 2adc713959..39d4582435 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -4647,7 +4647,7 @@ BIF_RETTYPE get_module_info_2(BIF_ALIST_2)
BIF_RET(ret);
}
-BIF_RETTYPE put_utag_1(BIF_ALIST_1)
+BIF_RETTYPE dt_put_tag_1(BIF_ALIST_1)
{
#ifdef USE_VM_PROBES
Eterm otag;
@@ -4675,7 +4675,7 @@ BIF_RETTYPE put_utag_1(BIF_ALIST_1)
#endif
}
-BIF_RETTYPE get_utag_0(BIF_ALIST_0)
+BIF_RETTYPE dt_get_tag_0(BIF_ALIST_0)
{
#ifdef USE_VM_PROBES
BIF_RET((DT_UTAG(BIF_P) == NIL || !(DT_UTAG_FLAGS(BIF_P) & DT_UTAG_PERMANENT)) ? am_undefined : DT_UTAG(BIF_P));
@@ -4683,7 +4683,7 @@ BIF_RETTYPE get_utag_0(BIF_ALIST_0)
BIF_RET(am_undefined);
#endif
}
-BIF_RETTYPE get_utag_data_0(BIF_ALIST_0)
+BIF_RETTYPE dt_get_tag_data_0(BIF_ALIST_0)
{
#ifdef USE_VM_PROBES
BIF_RET((DT_UTAG(BIF_P) == NIL) ? am_undefined : DT_UTAG(BIF_P));
@@ -4691,7 +4691,7 @@ BIF_RETTYPE get_utag_data_0(BIF_ALIST_0)
BIF_RET(am_undefined);
#endif
}
-BIF_RETTYPE prepend_vm_utag_data_1(BIF_ALIST_1)
+BIF_RETTYPE dt_prepend_vm_tag_data_1(BIF_ALIST_1)
{
#ifdef USE_VM_PROBES
Eterm b;
@@ -4718,7 +4718,7 @@ BIF_RETTYPE prepend_vm_utag_data_1(BIF_ALIST_1)
BIF_RET(BIF_ARG_1);
#endif
}
-BIF_RETTYPE append_vm_utag_data_1(BIF_ALIST_1)
+BIF_RETTYPE dt_append_vm_tag_data_1(BIF_ALIST_1)
{
#ifdef USE_VM_PROBES
Eterm b;
@@ -4745,7 +4745,7 @@ BIF_RETTYPE append_vm_utag_data_1(BIF_ALIST_1)
BIF_RET(BIF_ARG_1);
#endif
}
-BIF_RETTYPE spread_utag_1(BIF_ALIST_1)
+BIF_RETTYPE dt_spread_tag_1(BIF_ALIST_1)
{
#ifdef USE_VM_PROBES
Eterm ret;
@@ -4779,7 +4779,7 @@ BIF_RETTYPE spread_utag_1(BIF_ALIST_1)
BIF_RET(am_true);
#endif
}
-BIF_RETTYPE restore_utag_1(BIF_ALIST_1)
+BIF_RETTYPE dt_restore_tag_1(BIF_ALIST_1)
{
#ifdef USE_VM_PROBES
Eterm *tpl;
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 7940544156..8a85e102d1 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -820,16 +820,16 @@ bif erlang:posixtime_to_universaltime/1
#
# The dtrace BIF's are always present, but give dummy results if dynamic trace is not enabled in the build
-bif erlang:put_utag/1
-bif erlang:get_utag/0
-bif erlang:get_utag_data/0
-bif erlang:spread_utag/1
-bif erlang:restore_utag/1
+bif erlang:dt_put_tag/1
+bif erlang:dt_get_tag/0
+bif erlang:dt_get_tag_data/0
+bif erlang:dt_spread_tag/1
+bif erlang:dt_restore_tag/1
# These are dummies even with enabled dynamic trace unless vm probes are enabled.
# They are also internal, for dtrace tags sent to the VM's own drivers (efile)
-bif erlang:prepend_vm_utag_data/1
-bif erlang:append_vm_utag_data/1
+bif erlang:dt_prepend_vm_tag_data/1
+bif erlang:dt_append_vm_tag_data/1
#
# Obsolete
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index edc935e1ff..b2fc571032 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -884,86 +884,86 @@ call_ext_only u==3 u$func:erlang:hibernate/3 => i_hibernate
#
# If VM probes are not enabled, we want to short-circult calls to
-# the utag BIFs to make them as cheap as possible.
+# the dt tag BIFs to make them as cheap as possible.
#
%unless USE_VM_PROBES
-call_ext Arity u$func:erlang:get_utag/0 => \
+call_ext Arity u$func:erlang:dt_get_tag/0 => \
move a=am_undefined r
-call_ext_last Arity u$func:erlang:get_utag/0 D => \
+call_ext_last Arity u$func:erlang:dt_get_tag/0 D => \
move a=am_undefined r | deallocate D | return
-call_ext_only Arity u$func:erlang:get_utag/0 => \
+call_ext_only Arity u$func:erlang:dt_get_tag/0 => \
move a=am_undefined r | return
-move Any r | call_ext Arity u$func:erlang:put_utag/1 => \
+move Any r | call_ext Arity u$func:erlang:dt_put_tag/1 => \
move a=am_undefined r
-move Any r | call_ext_last Arity u$func:erlang:put_utag/1 D => \
+move Any r | call_ext_last Arity u$func:erlang:dt_put_tag/1 D => \
move a=am_undefined r | deallocate D | return
-move Any r | call_ext_only Arity u$func:erlang:put_utag/1 => \
+move Any r | call_ext_only Arity u$func:erlang:dt_put_tag/1 => \
move a=am_undefined r | return
-call_ext Arity u$func:erlang:put_utag/1 => \
+call_ext Arity u$func:erlang:dt_put_tag/1 => \
move a=am_undefined r
-call_ext_last Arity u$func:erlang:put_utag/1 D => \
+call_ext_last Arity u$func:erlang:dt_put_tag/1 D => \
move a=am_undefined r | deallocate D | return
-call_ext_only Arity u$func:erlang:put_utag/1 => \
+call_ext_only Arity u$func:erlang:dt_put_tag/1 => \
move a=am_undefined r | return
-call_ext Arity u$func:erlang:get_utag_data/0 => \
+call_ext Arity u$func:erlang:dt_get_tag_data/0 => \
move a=am_undefined r
-call_ext_last Arity u$func:erlang:get_utag_data/0 D => \
+call_ext_last Arity u$func:erlang:dt_get_tag_data/0 D => \
move a=am_undefined r | deallocate D | return
-call_ext_only Arity u$func:erlang:get_utag_data/0 => \
+call_ext_only Arity u$func:erlang:dt_get_tag_data/0 => \
move a=am_undefined r | return
-move Any r | call_ext Arity u$func:erlang:spread_utag/1 => \
+move Any r | call_ext Arity u$func:erlang:dt_spread_tag/1 => \
move a=am_true r
-move Any r | call_ext_last Arity u$func:erlang:spread_utag/1 D => \
+move Any r | call_ext_last Arity u$func:erlang:dt_spread_tag/1 D => \
move a=am_true r | deallocate D | return
-move Any r | call_ext_only Arity u$func:erlang:spread_utag/1 => \
+move Any r | call_ext_only Arity u$func:erlang:dt_spread_tag/1 => \
move a=am_true r | return
-call_ext Arity u$func:erlang:spread_utag/1 => \
+call_ext Arity u$func:erlang:dt_spread_tag/1 => \
move a=am_true r
-call_ext_last Arity u$func:erlang:spread_utag/1 D => \
+call_ext_last Arity u$func:erlang:dt_spread_tag/1 D => \
move a=am_true r | deallocate D | return
-call_ext_only Arity u$func:erlang:spread_utag/1 => \
+call_ext_only Arity u$func:erlang:dt_spread_tag/1 => \
move a=am_true r | return
-move Any r | call_ext Arity u$func:erlang:restore_utag/1 => \
+move Any r | call_ext Arity u$func:erlang:dt_restore_tag/1 => \
move a=am_true r
-move Any r | call_ext_last Arity u$func:erlang:restore_utag/1 D => \
+move Any r | call_ext_last Arity u$func:erlang:dt_restore_tag/1 D => \
move a=am_true r | deallocate D | return
-move Any r | call_ext_only Arity u$func:erlang:restore_utag/1 => \
+move Any r | call_ext_only Arity u$func:erlang:dt_restore_tag/1 => \
move a=am_true r | return
-call_ext Arity u$func:erlang:restore_utag/1 => \
+call_ext Arity u$func:erlang:dt_restore_tag/1 => \
move a=am_true r
-call_ext_last Arity u$func:erlang:restore_utag/1 D => \
+call_ext_last Arity u$func:erlang:dt_restore_tag/1 D => \
move a=am_true r | deallocate D | return
-call_ext_only Arity u$func:erlang:restore_utag/1 => \
+call_ext_only Arity u$func:erlang:dt_restore_tag/1 => \
move a=am_true r | return
-move Any r | call_ext Arity u$func:erlang:prepend_vm_utag_data/1 => \
+move Any r | call_ext Arity u$func:erlang:dt_prepend_vm_tag_data/1 => \
move Any r
-move Any r | call_ext_last Arity u$func:erlang:prepend_vm_utag_data/1 D => \
+move Any r | call_ext_last Arity u$func:erlang:dt_prepend_vm_tag_data/1 D => \
move Any r | deallocate D | return
-move Any r | call_ext_only Arity u$func:erlang:prepend_vm_utag_data/1 => \
+move Any r | call_ext_only Arity u$func:erlang:dt_prepend_vm_tag_data/1 => \
move Any r | return
-call_ext Arity u$func:erlang:prepend_vm_utag_data/1 =>
-call_ext_last Arity u$func:erlang:prepend_vm_utag_data/1 D => \
+call_ext Arity u$func:erlang:dt_prepend_vm_tag_data/1 =>
+call_ext_last Arity u$func:erlang:dt_prepend_vm_tag_data/1 D => \
deallocate D | return
-call_ext_only Arity u$func:erlang:prepend_vm_utag_data/1 => \
+call_ext_only Arity u$func:erlang:dt_prepend_vm_tag_data/1 => \
return
-move Any r | call_ext Arity u$func:erlang:append_vm_utag_data/1 => \
+move Any r | call_ext Arity u$func:erlang:dt_append_vm_tag_data/1 => \
move Any r
-move Any r | call_ext_last Arity u$func:erlang:append_vm_utag_data/1 D => \
+move Any r | call_ext_last Arity u$func:erlang:dt_append_vm_tag_data/1 D => \
move Any r | deallocate D | return
-move Any r | call_ext_only Arity u$func:erlang:append_vm_utag_data/1 => \
+move Any r | call_ext_only Arity u$func:erlang:dt_append_vm_tag_data/1 => \
move Any r | return
-call_ext Arity u$func:erlang:append_vm_utag_data/1 =>
-call_ext_last Arity u$func:erlang:append_vm_utag_data/1 D => \
+call_ext Arity u$func:erlang:dt_append_vm_tag_data/1 =>
+call_ext_last Arity u$func:erlang:dt_append_vm_tag_data/1 D => \
deallocate D | return
-call_ext_only Arity u$func:erlang:append_vm_utag_data/1 => \
+call_ext_only Arity u$func:erlang:dt_append_vm_tag_data/1 => \
return
# Can happen after one of the transformations above.
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index ea6d2cb8c6..a62a461146 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index f7861514ae..8d6ec96f33 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -268,7 +268,7 @@ advise(#file_descriptor{module = ?MODULE, data = {Port, _}},
%% Returns {error, Reason} | ok.
write(#file_descriptor{module = ?MODULE, data = {Port, _}}, Bytes) ->
- case drv_command_nt(Port, [?FILE_WRITE,erlang:prepend_vm_utag_data(Bytes)],false,undefined) of
+ case drv_command_nt(Port, [?FILE_WRITE,erlang:dt_prepend_vm_tag_data(Bytes)],false,undefined) of
{ok, _Size} ->
ok;
Error ->
@@ -283,7 +283,7 @@ pwrite(#file_descriptor{module = ?MODULE, data = {Port, _}}, L)
pwrite_int(_, [], 0, [], []) ->
ok;
pwrite_int(Port, [], N, Spec, Data) ->
- Header = list_to_binary([?FILE_PWRITEV, erlang:prepend_vm_utag_data(<<N:32>>) | reverse(Spec)]),
+ Header = list_to_binary([?FILE_PWRITEV, erlang:dt_prepend_vm_tag_data(<<N:32>>) | reverse(Spec)]),
case drv_command_nt(Port, [Header | reverse(Data)], false, undefined) of
{ok, _Size} ->
ok;
@@ -402,7 +402,7 @@ pread(#file_descriptor{module = ?MODULE, data = {Port, _}}, L)
pread_int(_, [], 0, []) ->
{ok, []};
pread_int(Port, [], N, Spec) ->
- drv_command_nt(Port, [?FILE_PREADV, erlang:prepend_vm_utag_data(<<0:32, N:32>>) | reverse(Spec)],false, undefined);
+ drv_command_nt(Port, [?FILE_PREADV, erlang:dt_prepend_vm_tag_data(<<0:32, N:32>>) | reverse(Spec)],false, undefined);
pread_int(Port, [{Offs, Size} | T], N, Spec)
when is_integer(Offs), is_integer(Size), 0 =< Size ->
if
@@ -424,7 +424,7 @@ pread(#file_descriptor{module = ?MODULE, data = {Port, _}}, Offs, Size)
-(?LARGEFILESIZE) =< Offs, Offs < ?LARGEFILESIZE,
Size < ?LARGEFILESIZE ->
case drv_command_nt(Port,
- [?FILE_PREADV, erlang:prepend_vm_utag_data(<<0:32, 1:32,
+ [?FILE_PREADV, erlang:dt_prepend_vm_tag_data(<<0:32, 1:32,
Offs:64/signed, Size:64>>)], false, undefined) of
{ok, [eof]} ->
eof;
@@ -923,7 +923,7 @@ drv_open(Driver, Portopts) ->
%% Closes a port in a safe way. Returns ok.
drv_close(Port) ->
- Save = erlang:spread_utag(false),
+ Save = erlang:dt_spread_tag(false),
try
try erlang:port_close(Port) catch error:_ -> ok end,
receive %% Ugly workaround in case the caller==owner traps exits
@@ -933,7 +933,7 @@ drv_close(Port) ->
ok
end
after
- erlang:restore_utag(Save)
+ erlang:dt_restore_tag(Save)
end.
@@ -958,8 +958,8 @@ drv_command(Port, Command, R) ->
end.
drv_command(Port, Command, Validated, R) when is_port(Port) ->
- Save = erlang:spread_utag(false),
- try erlang:port_command(Port, erlang:append_vm_utag_data(Command)) of
+ Save = erlang:dt_spread_tag(false),
+ try erlang:port_command(Port, erlang:dt_append_vm_tag_data(Command)) of
true ->
drv_get_response(Port, R)
catch
@@ -979,7 +979,7 @@ drv_command(Port, Command, Validated, R) when is_port(Port) ->
error:Reason ->
{error, Reason}
after
- erlang:restore_utag(Save)
+ erlang:dt_restore_tag(Save)
end;
drv_command({Driver, Portopts}, Command, Validated, R) ->
case drv_open(Driver, Portopts) of
@@ -991,7 +991,7 @@ drv_command({Driver, Portopts}, Command, Validated, R) ->
Error
end.
drv_command_nt(Port, Command, Validated, R) when is_port(Port) ->
- Save = erlang:spread_utag(false),
+ Save = erlang:dt_spread_tag(false),
try erlang:port_command(Port, Command) of
true ->
drv_get_response(Port, R)
@@ -1012,7 +1012,7 @@ drv_command_nt(Port, Command, Validated, R) when is_port(Port) ->
error:Reason ->
{error, Reason}
after
- erlang:restore_utag(Save)
+ erlang:dt_restore_tag(Save)
end.
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 260f216725..0c2e846010 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -614,10 +614,6 @@ type(erlang, adler32_combine, 3, Xs) ->
type(erlang, append, 2, Xs) -> type(erlang, '++', 2, Xs); % alias
type(erlang, append_element, 2, Xs) ->
strict(arg_types(erlang, append_element, 2), Xs, fun (_) -> t_tuple() end);
-type(erlang, append_vm_utag_data, 1, Xs) ->
- strict(arg_types(erlang, append_vm_utag_data, 1),
- Xs,
- fun(_) -> t_iodata() end);
type(erlang, apply, 2, Xs) ->
Fun = fun ([X, _Y]) ->
case t_is_fun(X) of
@@ -714,6 +710,27 @@ type(erlang, display_nl, 0, _) ->
t_atom('true');
type(erlang, dist_exit, 3, Xs) ->
strict(arg_types(erlang, dist_exit, 3), Xs, fun (_) -> t_atom('true') end);
+type(erlang, dt_append_vm_tag_data, 1, Xs) ->
+ strict(arg_types(erlang, dt_append_vm_tag_data, 1),
+ Xs,
+ fun(_) -> t_iodata() end);
+type(erlang, dt_get_tag, 0, _) ->
+ t_sup(t_binary(), t_atom('undefined'));
+type(erlang, dt_get_tag_data, 0, _) ->
+ t_sup(t_binary(), t_atom('undefined'));
+type(erlang, dt_prepend_vm_tag_data, 1, Xs) ->
+ strict(arg_types(erlang, dt_prepend_vm_tag_data, 1),
+ Xs,
+ fun(_) -> t_iodata() end);
+type(erlang, dt_put_tag, 1, Xs) ->
+ strict(arg_types(erlang, dt_put_tag, 1), Xs,
+ fun(_) -> t_sup(t_binary(), t_atom('undefined')) end);
+type(erlang, dt_restore_tag, 1, Xs) ->
+ strict(arg_types(erlang, dt_restore_tag, 1), Xs, fun(_) -> t_atom('true') end);
+type(erlang, dt_spread_tag, 1, Xs) ->
+ strict(arg_types(erlang, dt_spread_tag, 1), Xs,
+ fun(_) -> t_sup(t_tuple([t_non_neg_integer(), t_sup(t_binary(), t_nil())]),
+ t_atom('true')) end);
type(erlang, element, 2, Xs) ->
strict(arg_types(erlang, element, 2), Xs,
fun ([X1, X2]) ->
@@ -804,10 +821,6 @@ type(erlang, get_module_info, 2, Xs) ->
type(erlang, get_stacktrace, 0, _) ->
t_list(t_tuple([t_atom(), t_atom(), t_sup([t_arity(), t_list()]),
t_list()]));
-type(erlang, get_utag, 0, _) ->
- t_sup(t_binary(), t_atom('undefined'));
-type(erlang, get_utag_data, 0, _) ->
- t_sup(t_binary(), t_atom('undefined'));
type(erlang, group_leader, 0, _) -> t_pid();
type(erlang, group_leader, 2, Xs) ->
strict(arg_types(erlang, group_leader, 2), Xs,
@@ -1194,10 +1207,6 @@ type(erlang, port_set_data, 2, Xs) ->
strict(arg_types(erlang, port_set_data, 2), Xs,
fun (_) -> t_atom('true') end);
type(erlang, pre_loaded, 0, _) -> t_list(t_atom());
-type(erlang, prepend_vm_utag_data, 1, Xs) ->
- strict(arg_types(erlang, prepend_vm_utag_data, 1),
- Xs,
- fun(_) -> t_iodata() end);
type(erlang, process_display, 2, _) -> t_atom('true');
type(erlang, process_flag, 2, Xs) ->
T_process_flag_returns = t_sup([t_boolean(), t_atom(), t_non_neg_integer()]),
@@ -1315,9 +1324,6 @@ type(erlang, purge_module, 1, Xs) ->
fun (_) -> t_atom('true') end);
type(erlang, put, 2, Xs) ->
strict(arg_types(erlang, put, 2), Xs, fun (_) -> t_any() end);
-type(erlang, put_utag, 1, Xs) ->
- strict(arg_types(erlang, put_utag, 1), Xs,
- fun(_) -> t_sup(t_binary(), t_atom('undefined')) end);
type(erlang, raise, 3, _) -> t_none();
type(erlang, read_timer, 1, Xs) ->
strict(arg_types(erlang, read_timer, 1), Xs,
@@ -1327,8 +1333,6 @@ type(erlang, ref_to_list, 1, Xs) ->
type(erlang, register, 2, Xs) ->
strict(arg_types(erlang, register, 2), Xs, fun (_) -> t_atom('true') end);
type(erlang, registered, 0, _) -> t_list(t_atom());
-type(erlang, restore_utag, 1, Xs) ->
- strict(arg_types(erlang, restore_utag, 1), Xs, fun(_) -> t_atom('true') end);
type(erlang, resume_process, 1, Xs) ->
strict(arg_types(erlang, resume_process, 1), Xs,
fun (_) -> t_any() end); %% TODO: overapproximation -- fix this
@@ -1443,10 +1447,6 @@ type(erlang, spawn_opt, 4, Xs) ->
type(erlang, split_binary, 2, Xs) ->
strict(arg_types(erlang, split_binary, 2), Xs,
fun (_) -> t_tuple([t_binary(), t_binary()]) end);
-type(erlang, spread_utag, 1, Xs) ->
- strict(arg_types(erlang, spread_utag, 1), Xs,
- fun(_) -> t_sup(t_tuple([t_non_neg_integer(), t_sup(t_binary(), t_nil())]),
- t_atom('true')) end);
type(erlang, start_timer, 3, Xs) ->
strict(arg_types(erlang, start_timer, 3), Xs, fun (_) -> t_reference() end);
type(erlang, statistics, 1, Xs) ->
@@ -3443,8 +3443,6 @@ arg_types(erlang, append, 2) ->
arg_types(erlang, '++', 2);
arg_types(erlang, append_element, 2) ->
[t_tuple(), t_any()];
-arg_types(erlang, append_vm_utag_data, 1) ->
- [t_iodata()];
arg_types(erlang, apply, 2) ->
[t_sup(t_tuple([t_module(),
t_atom()]),
@@ -3518,6 +3516,20 @@ arg_types(erlang, display_string, 1) ->
[t_string()];
arg_types(erlang, dist_exit, 3) ->
[t_pid(), t_dist_exit(), t_sup(t_pid(), t_port())];
+arg_types(erlang, dt_append_vm_tag_data, 1) ->
+ [t_iodata()];
+arg_types(erlang, dt_get_tag, 0) ->
+ [];
+arg_types(erlang, dt_get_tag_data, 0) ->
+ [];
+arg_types(erlang, dt_prepend_vm_tag_data, 1) ->
+ [t_iodata()];
+arg_types(erlang, dt_put_tag, 1) ->
+ [t_sup(t_binary(), t_atom('undefined'))];
+arg_types(erlang, dt_restore_tag, 1) ->
+ [t_sup(t_tuple([t_non_neg_integer(), t_sup(t_binary(), t_nil())]), t_atom('true'))];
+arg_types(erlang, dt_spread_tag, 1) ->
+ [t_boolean()];
arg_types(erlang, element, 2) ->
[t_pos_fixnum(), t_tuple()];
arg_types(erlang, erase, 0) ->
@@ -3570,10 +3582,6 @@ arg_types(erlang, get_module_info, 1) ->
[t_atom()];
arg_types(erlang, get_module_info, 2) ->
[t_atom(), t_module_info_2()];
-arg_types(erlang, get_utag, 0) ->
- [];
-arg_types(erlang, get_utag_data, 0) ->
- [];
arg_types(erlang, group_leader, 0) ->
[];
arg_types(erlang, group_leader, 2) ->
@@ -3790,8 +3798,6 @@ arg_types(erlang, port_set_data, 2) ->
[t_sup(t_port(), t_atom()), t_any()];
arg_types(erlang, pre_loaded, 0) ->
[];
-arg_types(erlang, prepend_vm_utag_data, 1) ->
- [t_iodata()];
arg_types(erlang, process_display, 2) ->
[t_pid(), t_atom('backtrace')];
arg_types(erlang, process_flag, 2) ->
@@ -3818,8 +3824,6 @@ arg_types(erlang, purge_module, 1) ->
[t_atom()];
arg_types(erlang, put, 2) ->
[t_any(), t_any()];
-arg_types(erlang, put_utag, 1) ->
- [t_sup(t_binary(), t_atom('undefined'))];
arg_types(erlang, raise, 3) ->
OldStyleType = t_list(t_tuple([t_atom(), t_atom(),
t_sup([t_arity(), t_list()])])),
@@ -3833,8 +3837,6 @@ arg_types(erlang, register, 2) ->
[t_atom(), t_sup(t_port(), t_pid())];
arg_types(erlang, registered, 0) ->
[];
-arg_types(erlang, restore_utag, 1) ->
- [t_sup(t_tuple([t_non_neg_integer(), t_sup(t_binary(), t_nil())]), t_atom('true'))];
arg_types(erlang, resume_process, 1) ->
[t_pid()]; % intended for debugging only
arg_types(erlang, round, 1) ->
@@ -3893,8 +3895,6 @@ arg_types(erlang, spawn_opt, 4) ->
[t_node(), t_atom(), t_list(), t_list(t_spawn_options())];
arg_types(erlang, split_binary, 2) ->
[t_binary(), t_non_neg_integer()];
-arg_types(erlang, spread_utag, 1) ->
- [t_boolean()];
arg_types(erlang, start_timer, 3) ->
[t_non_neg_integer(), t_sup(t_pid(), t_atom()), t_any()];
arg_types(erlang, statistics, 1) ->
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index b281151778..e2290f6a23 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1416,10 +1416,10 @@ mode_list(_) ->
%% Functions for communicating with the file server
call(Command, Args) when is_list(Args) ->
- X = erlang:spread_utag(true),
+ X = erlang:dt_spread_tag(true),
Y = gen_server:call(?FILE_SERVER, list_to_tuple([Command | Args]),
infinity),
- erlang:restore_utag(X),
+ erlang:dt_restore_tag(X),
Y.
check_and_call(Command, Args) when is_list(Args) ->
diff --git a/lib/kernel/src/file_io_server.erl b/lib/kernel/src/file_io_server.erl
index 6369a5250c..7311ad9fee 100644
--- a/lib/kernel/src/file_io_server.erl
+++ b/lib/kernel/src/file_io_server.erl
@@ -57,11 +57,11 @@ start_link(Owner, FileName, ModeList)
do_start(Spawn, Owner, FileName, ModeList) ->
Self = self(),
Ref = make_ref(),
- Utag = erlang:spread_utag(true),
+ Utag = erlang:dt_spread_tag(true),
Pid =
erlang:Spawn(
fun() ->
- erlang:restore_utag(Utag),
+ erlang:dt_restore_tag(Utag),
%% process_flag(trap_exit, true),
case parse_options(ModeList) of
{ReadMode, UnicodeMode, Opts} ->
@@ -86,7 +86,7 @@ do_start(Spawn, Owner, FileName, ModeList) ->
exit(Reason1)
end
end),
- erlang:restore_utag(Utag),
+ erlang:dt_restore_tag(Utag),
Mref = erlang:monitor(process, Pid),
receive
{Ref, {error, _Reason} = Error} ->
diff --git a/lib/runtime_tools/src/dyntrace.erl b/lib/runtime_tools/src/dyntrace.erl
index 20472a2be6..388c7679b9 100644
--- a/lib/runtime_tools/src/dyntrace.erl
+++ b/lib/runtime_tools/src/dyntrace.erl
@@ -14,7 +14,7 @@
%%% four integer arguments and four string arguments; the integer
%%% argument(s) must come before any string argument. For example:
%%% ```
-%%% 1> dyntrace:put_utag("GGOOOAAALL!!!!!").
+%%% 1> dyntrace:put_tag("GGOOOAAALL!!!!!").
%%% true
%%% 2> dyntrace:init().
%%% ok
@@ -39,7 +39,7 @@
-export([available/0,
user_trace_s1/1, % TODO: unify with pid & tag args like user_trace_i4s4
p/0, p/1, p/2, p/3, p/4, p/5, p/6, p/7, p/8]).
--export([put_utag/1, get_utag/0, get_utag_data/0, spread_utag/1, restore_utag/1]).
+-export([put_tag/1, get_tag/0, get_tag_data/0, spread_tag/1, restore_tag/1]).
-export([scaff/0]). % Development only
-export([user_trace_i4s4/9]). % Know what you're doing!
@@ -210,7 +210,7 @@ p(I1, I2, I3, I4, S1, S2, S3, S4) when is_integer(I1), is_integer(I2), is_intege
true | false | error | badarg.
user_trace_int(I1, I2, I3, I4, S1, S2, S3, S4) ->
- UTag = get_utag(),
+ UTag = get_tag(),
try
user_trace_i4s4(UTag, I1, I2, I3, I4, S1, S2, S3, S4)
catch
@@ -218,28 +218,28 @@ user_trace_int(I1, I2, I3, I4, S1, S2, S3, S4) ->
false
end.
--spec put_utag(undefined | iodata()) -> binary() | undefined.
-put_utag(Data) ->
- erlang:put_utag(unicode:characters_to_binary(Data)).
+-spec put_tag(undefined | iodata()) -> binary() | undefined.
+put_tag(Data) ->
+ erlang:dt_put_tag(unicode:characters_to_binary(Data)).
--spec get_utag() -> binary() | undefined.
-get_utag() ->
- erlang:get_utag().
+-spec get_tag() -> binary() | undefined.
+get_tag() ->
+ erlang:dt_get_tag().
--spec get_utag_data() -> binary() | undefined.
-%% Gets utag if set, otherwise the spread utag data from last incoming message
-get_utag_data() ->
- erlang:get_utag_data().
+-spec get_tag_data() -> binary() | undefined.
+%% Gets tag if set, otherwise the spread tag data from last incoming message
+get_tag_data() ->
+ erlang:dt_get_tag_data().
--spec spread_utag(boolean()) -> true | {non_neg_integer(), binary() | []}.
-%% Makes the utag behave as a sequential trace token, will spread with messages to be picked up by someone using
-%% get_utag_data or get_drv_utag_data.
-spread_utag(B) ->
- erlang:spread_utag(B).
+-spec spread_tag(boolean()) -> true | {non_neg_integer(), binary() | []}.
+%% Makes the tag behave as a sequential trace token, will spread with
+%% messages to be picked up by someone using get_tag_data
+spread_tag(B) ->
+ erlang:dt_spread_tag(B).
--spec restore_utag(true | {non_neg_integer(), binary() | []}) -> true.
-restore_utag(T) ->
- erlang:restore_utag(T).
+-spec restore_tag(true | {non_neg_integer(), binary() | []}) -> true.
+restore_tag(T) ->
+ erlang:dt_restore_tag(T).
%% Scaffolding to write tedious code: quick brute force and not 100% correct.