anchor.diff:  	profiling = false,
   	pattern   = {'_','_','_'},
   	rootset   = [],
  +	fd    = undefined,
   	start_ts  = undefined,
   	reply     = undefined,
   	bpd       = #bpd{}
  
positive.code: 		    rootset   = Rootset,
  		    start_ts  = T0,
  		    reply     = From,
  		    pattern   = Pattern
  		}};
  	false ->
  	    {reply, error, #state{}}
      end;
  
  handle_call(stop_profiling, _From, #state{ profiling = false } = S) ->
  
negative.code: sum_bp_total_n_us(Mfas) ->
      lists:foldl(fun ({_, {Ci,Usi}}, {Co, Uso}) -> {Co + Ci, Uso + Usi} end, {0,0}, Mfas).
  
  print_bp_mfa(Mfas, {_Tn, Tus}, Fd, Opts) ->
      print(Fd, ["FUNCTION", "CALLS", "  %", "TIME", "uS / CALLS"]),
      print(Fd, ["--------", "-----", "---", "----", "----------"]),
      lists:foreach(fun
  	    ({_, {Count, Time}}) when Count =:= 0; Time < 1 ->
  		ok;
  	    ({Mfa, {Count, Time}}) ->
  		print(Fd, [s(Mfa), s(Count), s("~.2f", [100*(Time/Tus)]), s(Time), s("~.2f", [Time/Count])]),
  		ok
  	end, filter_mfa(sort_mfa(Mfas, proplists:get_value(sort, Opts)), proplists:get_value(thresholds, Opts))),
      ok.
  
  handle_call({analyze, _, _}, _, #state{ bpd = #bpd{ p = {0,nil}, us = 0, n = 0} = Bpd } = S) when is_record(Bpd, bpd) ->
      {reply, nothing_to_analyze, S};
  
  handle_call({analyze, procs, Opts}, _, #state{ bpd = #bpd{ p = Ps, us = Tus} = Bpd, fd = Fd} = S) when is_record(Bpd, bpd) ->
      lists:foreach(fun
  	    ({Pid, Mfas}) ->
  		{Pn, Pus} =  sum_bp_total_n_us(Mfas),
  		format(Fd, "~n****** Process ~w    -- ~s % of profiled time *** ~n", [Pid, s("~.2f", [100.0*(Pus/Tus)])]),
  		print_bp_mfa(Mfas, {Pn,Pus}, Fd, Opts),
  		ok
  	end, gb_trees:to_list(Ps)),
      {reply, ok, S};
  
  handle_call({analyze, total, Opts}, _, #state{ bpd = #bpd{ mfa = Mfas, n = Tn, us = Tus} = Bpd, fd = Fd} = S) when is_record(Bpd, bpd) ->
      print_bp_mfa(Mfas, {Tn, Tus}, Fd, Opts),
      {reply, ok, S};
  
  handle_call({analyze, Type, _Opts}, _, S) ->
  