Automatic analysis of inefficiency patterns in parallel applications