Patent ID: 8091073

Claim:
A method, in a data processing system comprising at least one hardware implemented processor, for identifying instructions, in a plurality of instructions, to be used to obtain representative traces of the execution of the plurality of instructions, the method comprising: calculating, by the data processing system, a phase instruction budget for each phase in a set of phases of the plurality of instructions, each phase comprising a subset of instructions from the plurality of instructions, wherein: the phase instruction budget is based on a weight associated with each phase and a global instruction budget, the global instruction budget specifies a maximum number of instructions to be used to trace execution of the plurality of instructions, and the phase instruction budget for an associated phase specifies a maximum number of instructions to be used to trace execution of a subset of instructions associated with the associated phase, and the weight associated with each phase is a proportion of instructions from full program execution that are attributed to the phase; identifying, by the data processing system, a starting index and an ending index for instructions within a set of intervals in each phase in order to meet the phase instruction budget for that phase, thereby forming a set of interval indices; determining, by the data processing system, if the instructions within the set of interval indices meet the global instruction budget; and responsive to the global instruction budget being met, outputting, by the data processing system, the set of interval indices as collection points for the representative traces.