Automated performance characterization of applications using hardware monitoring events