The Software Tuning Agent: A Tool for Workload Characterization and Microarchitecture Studies