anchor.diff:                           end, self()}),
       dbg:p(all, call),
       [{ok, N} = dbg:n(N) || N <- Nodes],
  +    dbg:tpl(?MODULE, trigger_sentinel, []),
       add_tracers(State#state.mfs),
  -    {reply, ok, State#state{trace=[], stop_tref = Tref}};
  +    {reply, ok, State#state{trace=[], stop_tref = Tref, tracing = true}};
  +handle_call(stop_collect, From, State = #state{tracing = true}) ->
  +    %% Trigger the sentinel so that we wait for the trace buffer to flush
  +    ?MODULE:trigger_sentinel(),
  +    {noreply, State#state{stop_from = From, tracing = stopping}};
  +handle_call(stop_collect, _From, State) ->
  +    {reply, State#state.tracing, State};
   handle_call({traces, Entries}, _From, State) ->
       {reply, ok, State#state{trace=Entries ++ State#state.trace}};
   handle_call(results, _From, State) ->
  
positive.code: zero_ts(Offset, [{Ts,Trace}|Rest], Acc) ->
      zero_ts(Offset, Rest, [{Ts - Offset, Trace} | Acc]).
  
  
negative.code:                             filters = [Filter | State#state.filters]}};
  handle_call({collect, Duration, Nodes}, _From, State) ->
      cancel_timer(State#state.stop_tref),
      Tref = timer:send_after(Duration, collect_timeout),
      dbg:stop_clear(),
      dbg:tracer(process, {fun ({trace, _, call, {?MODULE, trigger_sentinel, _}}, Pid) ->
                                   gen_server:cast(Pid, stop_sentinel),
                                   Pid;
                               (Msg, Pid) ->
                                   Entries = lists:flatten(
                                               [begin
                                                    case catch F(Msg) of
  