tracing: Simplify the iteration logic in f_start/f_next