aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_lib.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-05-27 16:27:26 +0200
committerDan Gudmundsson <[email protected]>2015-06-05 12:57:34 +0200
commitb65330a798ffa38a93cc161596a826b6018cebd3 (patch)
tree9cf074bf5871d79024debc2030eeecc8cba08c03 /lib/observer/src/observer_lib.erl
parent534a23c34d38a954610ac11329515a373efa008b (diff)
downloadotp-b65330a798ffa38a93cc161596a826b6018cebd3.tar.gz
otp-b65330a798ffa38a93cc161596a826b6018cebd3.tar.bz2
otp-b65330a798ffa38a93cc161596a826b6018cebd3.zip
observer: cdv add scheduler information
New info in 18.
Diffstat (limited to 'lib/observer/src/observer_lib.erl')
-rw-r--r--lib/observer/src/observer_lib.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index c3d48dff35..40a3eb8831 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -173,12 +173,17 @@ fill_info([{Str,SubStructure}|Rest], Data) when is_list(SubStructure) ->
[{Str, fill_info(SubStructure, Data)}|fill_info(Rest,Data)];
fill_info([{Str,Attrib,SubStructure}|Rest], Data) ->
[{Str, Attrib, fill_info(SubStructure, Data)}|fill_info(Rest,Data)];
+fill_info([{Str, Key = {K,N}}|Rest], Data) when is_atom(K), is_integer(N) ->
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str, Value} | fill_info(Rest, Data)]
+ end;
fill_info([], _) -> [].
-get_value(Key, Data) when is_atom(Key) ->
- proplists:get_value(Key,Data);
get_value(Fun, Data) when is_function(Fun) ->
- Fun(Data).
+ Fun(Data);
+get_value(Key, Data) ->
+ proplists:get_value(Key,Data).
update_info([Fields|Fs], [{_Header, SubStructure}| Rest]) ->
update_info2(Fields, SubStructure),