anchor.diff:      end.
   
   beam_stat(Stat, Sample, Default) ->
  -    case proc_stat(<<"beam.smp">>, Stat, Sample) of
  -        undefined ->
  -            case proc_stat(<<"erl">>, Stat, Sample) of
  -                undefined ->
  -                    proc_stat(<<"beam">>, Stat, Sample, Default);
  -                V ->
  -                    V
  -            end;
  -        V ->
  -            V
  -    end.
  +    proc_stat(?MAIN_BEAM_NAME, Stat, Sample, Default).
   
   proc_stat(Name, Stat, Sample) ->
       proc_stat(Name, Stat, Sample, undefined).
  
positive.code:       PageFaults:64/native,
        Rest/binary>> = Bin,
  
      Name = extract_string(Name0),
      case Name of
          <<>> ->
              Acc;
          _ ->
              NewSample0 =
                  [{proc_stat_name(Name, mem_size), MemSize},
                   {proc_stat_name(Name, mem_resident), MemResident},
  
negative.code: -include("ns_common.hrl").
  
  -include("ns_stats.hrl").
  
  -define(MAIN_BEAM_NAME, <<"(main)beam.smp">>).
  
  %% API
  -export([start_link/0]).
  