Using probabilistic reasoning to automate software tuning