def run(self, phased=False): counters = [ 'inst_retired.any', 'instructions', 'mem_inst_retired.all_loads', 'mem_inst_retired.all_stores', 'L1-dcache-loads', 'L1-dcache-stores', 'LLC-load-misses', 'LLC-store-misses', 'cycles', 'fp_arith_inst_retired.128b_packed_double', 'fp_arith_inst_retired.128b_packed_single', 'fp_arith_inst_retired.256b_packed_double', 'fp_arith_inst_retired.256b_packed_single' ] for prereq in self.prereqs: self.logger.info("Running prereq %s" % prereq) run_command(prereq.split(), self.logger) for task in self.commands: name = task["name"] command = task["command"] self.logger.info("Running command %s" % name) p = Perf() p.set_command(command) p.set_counters(counters) p.set_repeat_factor(1) if phased: result = p.run_phased() for res in result: res["name"] = name self.data.extend(result) else: result = p.run() if result is not None: result["name"] = name self.data.append(result)