×

Run-time wait tracing using byte code insertion

  • US 7,275,239 B2
  • Filed: 02/10/2003
  • Issued: 09/25/2007
  • Est. Priority Date: 02/10/2003
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of tracing run-time waits to measure time spent waiting due to synchronization, comprising steps of:

  • programmatically performing code analysis prior to execution of an application, further comprising steps of;

    comparing byte code of the application to stored patterns that describe known wait points where code may wait to get a monitor that synchronizes access to a shared resource, thereby locating one or more locations in the code where a wait due to synchronization may occur at run time; and

    recording the located locations; and

    programmatically instrumenting the located locations, during execution of the application at run time, further comprising steps of;

    intercepting load requests for executable elements of the application, as each executable element is to be loaded for execution; and

    invoking an augmented class loader to carry out each of the intercepted load requests, wherein the augmented class loader creates an instrumented version of the executable element that is to be loaded by consulting the recorded locations to determine ones thereof which are found in the executable element and programmatically inserting pre-invocation byte code before each of the determined ones and post-invocation byte code after each of the determined ones, wherein the pre-invocation byte code and the post-invocation byte code are executable to generate data for measuring the time spent waiting at each of the determined ones due to synchronization, and then loads the instrumented version for execution instead of loading the executable element.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×