anchor.diff:                  error -> #dump{}
               end,
   
  -            NewPidState = fprof_dump_proc_stream(Term, PidState),
  +            NewPidState = trace_proc_stream(Term, PidState),
   
               D1 = dict:erase(PidS, State),
               D2 = dict:append(PidS, NewPidState, D1),
  -            fprof_dump_listener(D2)
  +            trace_listener(D2)
       end.
   
   us({Mega, Secs, Micro}) ->
  
positive.code:             end
      end.
  
  fprof_dump_proc_stream({trace_ts, _Ps, call, MFA, {cp, CallerMFA}, Ts}, #dump{stack=[]} = State) ->
      new_state(State, [MFA, CallerMFA], Ts);
  
  fprof_dump_proc_stream({trace_ts, _Ps, call, MFA, {cp, MFA}, Ts}, #dump{stack=[MFA|Stack]} = State) ->
      new_state(State, [MFA|Stack], Ts); % collapse tail recursion
  
  fprof_dump_proc_stream({trace_ts, _Ps, call, MFA, {cp, CpMFA}, Ts}, #dump{stack=[CpMFA|Stack]} = State) ->
      new_state(State, [MFA, CpMFA|Stack], Ts);
  
  fprof_dump_proc_stream({trace_ts, _Ps, call, _MFA, {cp, _}, _Ts} = TraceTs, #dump{stack=[_|StackRest]} = State) ->
      fprof_dump_proc_stream(TraceTs, State#dump{stack=StackRest});
  
  fprof_dump_proc_stream({trace_ts, _Ps, T, _Args, _Ts} = TraceTs, State) ->
      case T of
          out -> ignore;
          in -> ignore;
  
negative.code:     ?MODULE:apply("stacks.out", M, F, A).
  
  apply(OutputFile, M, F, A) ->
      Tracer = spawn(fun() -> trace_listener(dict:new()) end),
  
      MatchSpec = [{'_', [], [{message, {{cp, {caller}}}}]}],
      erlang:trace_pattern(on_load, MatchSpec, [local]),
      erlang:trace_pattern({'_', '_', '_'}, MatchSpec, [local]),
      erlang:trace(self(), true, [{tracer, Tracer} | trace_flags(normal_with_children)]),
      erlang:apply(M, F, A),
      erlang:trace(self(), false, [all]),
  
      Tracer ! {dump, self()},
      PS = receive
  