Characterizing and controlling program behavior using execution-time variance