anchor.diff:              comm:send(Pid, {get_trace_reply, lists:reverse(Msgs)})
       end,
       State;
  -on({clear_trace, TraceId}, State) ->
  -    lists:keytake(TraceId, 1, State).
  +on({cleanup, TraceId}, State) ->
  +    case lists:keytake(TraceId, 1, State) of
  +        {value, _Tuple, TupleList2} -> TupleList2;
  +        false                       -> State
  +    end.
   
   passed_state_new(TraceId, Logger) -> {TraceId, Logger}.
   passed_state_trace_id(State)      -> element(1, State).
  
positive.code: %% @version $Id$
  -module(trace_mpath).
  -author('schintke@zib.de').
  -vsn('$Id$').
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%
  %% 1. call trace_mpath:start(your_trace_id)
  %% 2. perform a request like api_tx:read("a")
  %% 3. call trace_mpath:stop(your_trace_id)
  %% 4. call trace_mpath:get_trace(your_trace_id) to retrieve the trace,
  %%    when you think everything is recorded
  %% 5. call trace_mpath:cleanup(your_trace_id) to free the memory
  
negative.code:     receive
          ?SCALARIS_RECV({get_trace_reply, Log}, Log)
      end.
  
  -spec cleanup() -> ok.
  cleanup() -> cleanup(default).
  
  -spec cleanup(trace_id()) -> ok.
  cleanup(TraceId) ->
  