perf machine: Add threads__set_last_match function