aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_procinfo.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-05-12 15:00:44 +0200
committerDan Gudmundsson <[email protected]>2016-05-12 15:00:44 +0200
commit08b773e0b43534495d987dda268cf56661cf5c01 (patch)
tree4e78c9ff3c77a1249004bb9987604709f64697f1 /lib/observer/src/observer_procinfo.erl
parente1ad5319f0b76460d9147ef04640c469f5a180d6 (diff)
downloadotp-08b773e0b43534495d987dda268cf56661cf5c01.tar.gz
otp-08b773e0b43534495d987dda268cf56661cf5c01.tar.bz2
otp-08b773e0b43534495d987dda268cf56661cf5c01.zip
Change binary debug tuple to size and refc info
And cut the line after 80 chars
Diffstat (limited to 'lib/observer/src/observer_procinfo.erl')
-rw-r--r--lib/observer/src/observer_procinfo.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index cff5fbb474..fe2aa11450 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -370,7 +370,7 @@ process_info_fields(Pid) ->
{"Priority", priority},
{"Trap Exit", trap_exit},
{"Reductions", reductions},
- {"Binary", binary},
+ {"Binary", fun(Data) -> stringify_bins(Data) end},
{"Last Calls", last_calls},
{"Catch Level", catchlevel},
{"Trace", trace},
@@ -437,6 +437,11 @@ filter_monitor_info() ->
[Pid || {process, Pid} <- Ms]
end.
+stringify_bins(Data) ->
+ Bins = proplists:get_value(binary, Data),
+ [lists:flatten(io_lib:format("<< ~s, refc ~w>>", [observer_lib:to_str({bytes,Sz}),Refc]))
+ || {_Ptr, Sz, Refc} <- Bins].
+
local_pid_str(Pid) ->
%% observer can observe remote nodes
%% There is no function to get the local
@@ -449,7 +454,6 @@ local_pid_str(Pid) ->
global_pid_node_pref(Pid) ->
%% Global PID node prefix : X of <X.Y.Z>
string:strip(string:sub_word(pid_to_list(Pid),1,$.),left,$<).
-
io_get_data(Pid) ->
Pid ! {self(), get_data_and_close},