anchor.diff:  -export([top/0]).
   
   -type state() :: { pdb:tableid(),
  -                   boolean(), %% monitoring is on
  -                   boolean(), %% output is on
  +                   false | all | pid, %% sampling: no, all or a single pid
  +                   false | all | pid, %% output: no, all, or a single pid
                      erlang_timestamp(), %% last output
                      non_neg_integer(), %% # of measures
                      non_neg_integer(), %% sort by
                      no_exclude | pid()
                    }.
   
  -
   -spec start_link(list()) -> {ok, pid()}.
   start_link(Group) ->
       gen_component:start_link(?MODULE, fun ?MODULE:on/2, [],
                                [{erlang_register, ?MODULE},
  -                             {pid_groups_join_as, Group, ?MODULE}]).
  +                              {pid_groups_join_as, Group, ?MODULE}]).
   
   -spec init([]) -> state().
   init([]) ->
  
positive.code:         Self -> setelement(7, State, no_exclude);
          _ -> setelement(7, State, self())
      end.
  
  
  
  vals_pid(Entry) -> element(1, Entry).
  vals_mqlen(Entry) -> element(2, Entry).
  
negative.code:                      Pid = element(1, X),
                       pdb:delete(Pid, TableName),
                       %% plot data is:
                       Infos = try_process_info(Pid, [status, memory, stack_size]),
                       Status = process_info_get(Infos, status, dead_pid),
                       {vals_pid(X),
                        Status,
                        vals_mqlen(X)/Count,
                        vals_cpu_usage(X, Count),
                        process_info_get(Infos, memory, 0),
                        process_info_get(Infos, stack_size, 0)}
                   end || X <- R1, is_tuple(X), is_pid(element(1, X)) ],
      SortedPlotData = lists:keysort(sort_by(State), PlotData),
      L = length(SortedPlotData),
  