If all_frames is True, all frames of the traceback are checked. If all_frames is False, only the most recent frame is checked.
tracemalloc/Filter.all_frames
Filter.all_frames