[trace] Split performance metrics at `nop` instruction
@@ -505,6 +505,11 @@ def main():
False, time_info, args.offl, not args.saddr, args.permissive)
if perf_metrics[0]['start'] is None:
perf_metrics[0]['start'] = time_info[1]
+ # Create a new section after every 'nop' instruction
+ if 'nop' in ann_insn:
+ perf_metrics[-1]['end'] = time_info[1]
+ perf_metrics.append(defaultdict(int))
+ perf_metrics[-1]['start'] = time_info[1]
if not empty:
print(ann_insn)
else:
