1. A computer-implemented method in a computer system for identifying a subset of a workload, which includes a plurality of dynamic instructions, to use as a trace, the computer-implemented method comprising: executing, on a processor unit hardware, the entire workload in real-time using a particular dataset, the processor unit hardware including at least one microprocessor and at least one cache; monitoring the real-time execution of the workload to obtain information about how the processor unit hardware executes the workload when the workload is being executed using the particular dataset to form actual performance information; generating a plurality of different subsets of the workload; comparing the execution of each one of the plurality of different subsets by the processor unit hardware with the actual performance information; and using a result of the comparison to select one of the plurality of different subsets that most closely represents the execution of the entire workload using the particular dataset to use as a trace.