anchor.diff:  get_lock_info_for(Categories) when is_list(Categories) ->
       ok = erts_debug:lcnt_control(mask, Categories),
       [{duration, _}, {locks, Locks}] = erts_debug:lcnt_collect(),
  -    Locks;
  +    remove_untoggleable_locks(Locks);
   
   get_lock_info_for(Category) when is_atom(Category) ->
       get_lock_info_for([Category]).
  
positive.code:     wait_for_empty_lock_list(10).
  wait_for_empty_lock_list(Tries) when Tries > 0 ->
      try_flush_cleanup_ops(),
      case erts_debug:lcnt_collect() of
          [{duration, _}, {locks, []}] ->
              ok;
          _ ->
              timer:sleep(50),
  
negative.code:             (_Lock) -> false
          end, DbLocks),
      ok.
  
  %% Not all locks can be toggled on or off due to technical limitations, so we
  %% need to filter them out when checking whether we successfully disabled lock
  %% counting.
  remove_untoggleable_locks([]) ->
      [];
  remove_untoggleable_locks([{resource_monitors, _, _, _} | T]) ->
      remove_untoggleable_locks(T);
  remove_untoggleable_locks([H | T]) ->
      [H | remove_untoggleable_locks(T)].
  