aboutsummaryrefslogtreecommitdiffstats
path: root/lib/runtime_tools/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/runtime_tools/src')
-rw-r--r--lib/runtime_tools/src/dbg.erl5
-rw-r--r--lib/runtime_tools/src/dyntrace.erl38
-rw-r--r--lib/runtime_tools/src/observer_backend.erl12
3 files changed, 32 insertions, 23 deletions
diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl
index 8cdb5a43e3..c0d4665bda 100644
--- a/lib/runtime_tools/src/dbg.erl
+++ b/lib/runtime_tools/src/dbg.erl
@@ -1155,7 +1155,7 @@ all() ->
[send,'receive',call,procs,ports,garbage_collection,running,
set_on_spawn,set_on_first_spawn,set_on_link,set_on_first_link,
timestamp,monotonic_timestamp,strict_monotonic_timestamp,
- arity,return_to,silent,running_procs,running_ports].
+ arity,return_to,silent,running_procs,running_ports,exiting].
display_info([Node|Nodes]) ->
io:format("~nNode ~w:~n",[Node]),
@@ -1313,6 +1313,9 @@ tc_loop(Other, _Handler, _HData) ->
gen_reader(ip, {Host, Portno}) ->
case gen_tcp:connect(Host, Portno, [{active, false}, binary]) of
{ok, Sock} ->
+ %% Just in case this is on the traced node,
+ %% make sure the port is not traced.
+ p(Sock,clear),
mk_reader(fun ip_read/2, Sock);
Error ->
exit(Error)
diff --git a/lib/runtime_tools/src/dyntrace.erl b/lib/runtime_tools/src/dyntrace.erl
index 28e6d67d96..58c5a773c3 100644
--- a/lib/runtime_tools/src/dyntrace.erl
+++ b/lib/runtime_tools/src/dyntrace.erl
@@ -42,15 +42,14 @@
-export([put_tag/1, get_tag/0, get_tag_data/0, spread_tag/1, restore_tag/1]).
-export([trace/5,
- trace/6,
- trace_procs/6,
- trace_ports/6,
- trace_running_procs/6,
- trace_running_ports/6,
- trace_call/6,
- trace_send/6,
- trace_receive/6,
- trace_garbage_collection/6]).
+ trace_procs/5,
+ trace_ports/5,
+ trace_running_procs/5,
+ trace_running_ports/5,
+ trace_call/5,
+ trace_send/5,
+ trace_receive/5,
+ trace_garbage_collection/5]).
-export([enabled_procs/3,
enabled_ports/3,
@@ -147,34 +146,31 @@ user_trace_i4s4(_, _, _, _, _, _, _, _, _) ->
user_trace_n(_, _, _, _, _, _, _, _, _, _) ->
erlang:nif_error(nif_not_loaded).
-trace(_TracerState, _Label, _SeqTraceInfo, _, _Opts) ->
+trace(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_procs(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_procs(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_ports(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_ports(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_running_procs(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_running_procs(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_running_ports(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_running_ports(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_call(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_call(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_send(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_send(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_receive(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
-trace_receive(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
- erlang:nif_error(nif_not_loaded).
-
-trace_garbage_collection(_TraceTag, _TracerState, _Tracee, _FirstTraceTerm, _SecondTraceTerm, _Opts) ->
+trace_garbage_collection(_TraceTag, _TracerState, _Tracee, _TraceTerm, _Opts) ->
erlang:nif_error(nif_not_loaded).
enabled(_TraceTag, _TracerState, _Tracee) ->
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 66653c5b7f..cedb677178 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -23,7 +23,8 @@
-export([vsn/0]).
%% observer stuff
--export([sys_info/0, get_table/3, get_table_list/2, fetch_stats/2]).
+-export([sys_info/0, get_port_list/0,
+ get_table/3, get_table_list/2, fetch_stats/2]).
%% etop stuff
-export([etop_collect/1]).
@@ -139,6 +140,15 @@ get_mnesia_loop(Parent, {Match, Cont}) ->
Parent ! {self(), Match},
get_mnesia_loop(Parent, mnesia:select(Cont)).
+get_port_list() ->
+ [begin
+ [{port_id,P}|erlang:port_info(P)] ++
+ case erlang:port_info(P,monitors) of
+ undefined -> [];
+ Monitors -> [Monitors]
+ end
+ end || P <- erlang:ports()].
+
get_table_list(ets, Opts) ->
HideUnread = proplists:get_value(unread_hidden, Opts, true),
HideSys = proplists:get_value(sys_hidden, Opts, true),