Methods, systems, computer program products, and methods of doing business
whereby programmatically-generated byte code insertion is used to perform
run-time tracing of code that potentially encounters a wait during
execution. The byte code insertion is performed at load time, and inserts
byte codes before and after a located (potential) wait point. The
inserted byte code functions to gather execution statistics, such as a
time stamp before invoking a located wait point and a time stamp after
invoking the located wait point. Preferred embodiments allow this tracing
to be selectively activated/deactivated.