aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/etop_txt.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-11-11 12:50:58 +0100
committerDan Gudmundsson <[email protected]>2013-11-11 12:55:59 +0100
commit8217d8dc329f53e182ae38e4659cdc8dbc8dd728 (patch)
treed9b67e92b83511687fdd1e87e0751f337c0ab5af /lib/observer/src/etop_txt.erl
parentf77b4655155009f546e2fc6265ee454d203dfba2 (diff)
downloadotp-8217d8dc329f53e182ae38e4659cdc8dbc8dd728.tar.gz
otp-8217d8dc329f53e182ae38e4659cdc8dbc8dd728.tar.bz2
otp-8217d8dc329f53e182ae38e4659cdc8dbc8dd728.zip
Remove etop gui
Use observer for the gui part
Diffstat (limited to 'lib/observer/src/etop_txt.erl')
-rw-r--r--lib/observer/src/etop_txt.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/observer/src/etop_txt.erl b/lib/observer/src/etop_txt.erl
index d0612f15b4..f048ff17ca 100644
--- a/lib/observer/src/etop_txt.erl
+++ b/lib/observer/src/etop_txt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -27,7 +27,6 @@
-include("etop_defs.hrl").
-import(etop,[loadinfo/1,meminfo/2]).
--import(etop_gui,[formatmfa/1,to_list/1]).
-define(PROCFORM,"~-15w~-20s~8w~8w~8w~8w ~-20s~n").
@@ -99,3 +98,13 @@ writepinfo(Fd,[#etop_proc_info{pid=Pid,
writepinfo(_Fd,[]) ->
ok.
+
+formatmfa({M, F, A}) ->
+ io_lib:format("~w:~w/~w",[M, F, A]);
+formatmfa(Other) ->
+ %% E.g. when running hipe - the current_function for some
+ %% processes will be 'undefined'
+ io_lib:format("~w",[Other]).
+
+to_list(Name) when is_atom(Name) -> atom_to_list(Name);
+to_list({_M,_F,_A}=MFA) -> formatmfa(MFA).