diff options
author | Dan Gudmundsson <[email protected]> | 2013-12-20 10:44:42 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-12-20 10:44:42 +0100 |
commit | 6f0b3bd3fc28de703490470630922873775c97f5 (patch) | |
tree | 520b662b4459499e8c58b658285368d81334d326 /lib/observer/src/etop_txt.erl | |
parent | 0b68c48630311c5c97db50159c3076fa5b17a43d (diff) | |
parent | 560f73141afbc1ef41d6c8acb3974b3632ad6f25 (diff) | |
download | otp-6f0b3bd3fc28de703490470630922873775c97f5.tar.gz otp-6f0b3bd3fc28de703490470630922873775c97f5.tar.bz2 otp-6f0b3bd3fc28de703490470630922873775c97f5.zip |
Merge branch 'dgud/remove-gs-apps/OTP-10915'
Diffstat (limited to 'lib/observer/src/etop_txt.erl')
-rw-r--r-- | lib/observer/src/etop_txt.erl | 13 |
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). |