1. In a data processing system, a method of benchmarking bytecode sequences comprising the steps of: analyzing a bytecode trace for frequently occurring sequences; generating a bytecode binary representation of one of said frequently occurring sequences and associated environmental dependencies; and injecting said binary bytecode program into a target executable, wherein said target executable is a benchmark driver program including coding for obtaining hardware metrics.