In one embodiment, the invention provides a method for the processing of
instructions. A method which comprises analyzing a dynamic execution
trace for a program; identifying at least one stream comprising a
plurality of basic blocks in the dynamic execution trace; collecting
metrics associated with the at least one stream; and optimizing the at
least one stream based on the metrics.