anchor.diff:              end,
       Nodes.
   
  -%%===============================================================================
  +%%=============================================================================
   %% Debug functions
  -%%===============================================================================
  +%%=============================================================================
   
   -spec(print_ages/0 :: () -> ok).
   print_ages() ->
  
positive.code: 
  loop() ->
      receive
      {halt,N} ->
          halt(N);
  	{get_comm_layer_dump, Sender} ->
  	    cs_send:send(Sender, {get_comm_layer_dump_response, 
  				  comm_logger:dump()}),
  	    loop()
      end.
  
  %%--------------------------------------------------------------------
  
negative.code:     {0, 0};
  get_aggregate(Tag, [{Dump, _} | Rest]) ->
      case gb_trees:lookup(Tag, Dump) of
          none ->
              get_aggregate(Tag, Rest);
          {value, {Size, Count}} ->
              {AggSize, AggCount} = get_aggregate(Tag, Rest),
              {AggSize + Size, AggCount + Count}
      end.
  
  diff_dump(BeforeDump, AfterDump, _RunTime) ->
      Tags = lists:usort(lists:flatten([gb_trees:keys(BeforeDump),
                                        gb_trees:keys(AfterDump)])),
      diff(Tags, BeforeDump, AfterDump).
  
  diff([], _Before, _After) ->
      [];
  diff([Tag | Rest], Before, After) ->
      {NewSize, NewCount} = gb_trees:get(Tag, After),
      case gb_trees:lookup(Tag, Before) of
          none ->
              [{Tag, NewSize, NewCount} | diff(Rest, Before, After)];
          {value, {Size, Count}} ->
              [{Tag, NewSize - Size, NewCount - Count} | diff(Rest, Before, After)]
      end.
  
  %%=============================================================================
  %% admin server functions
  %%=============================================================================
  start_link() ->
      {ok, spawn_link(?MODULE, start, [])}.
  
  