Backported UPerf from master (3.5)