×

Method for JIT compiler to optimize repetitive synchronization

  • US 8,104,028 B2
  • Filed: 03/31/2009
  • Issued: 01/24/2012
  • Est. Priority Date: 05/30/2003
  • Status: Expired due to Fees
First Claim
Patent Images

1. In a just-in-time compiler of program code, the program code including a plurality of blocks of instructions and the program code, when executed, performing repetitive synchronization on a plurality of objects, a method of optimizing said repetitive synchronization, said method comprising the steps of:

  • examining said program code to collect information about each block of said plurality of blocks to identify candidate locking operations and candidate unlocking operations in paths between an initial locking operation and a final unlocking operation, wherein said information includes a first subset, a second subset and a third subset of said plurality of blocks, where said first subset includes blocks that include a locking operation, said second subset includes blocks that include an unlocking operation, and said third subset includes blocks that succeed a given block;

    analyzing said information to determine a set of synchronization operations to be removed, including;

    selecting a given object of said plurality of objects, where said given object is repetitively synchronized;

    selecting a given block, from said second subset, in which a unlocking operation on said given object is to be performed;

    selecting a successor block, from an intersection of said first subset and said third subset, in which a locking operation on said given object is to be performed; and

    adding said unlocking operation and said locking operation to said set of synchronization operations to be removed;

    modifying the program code based on said set of synchronization operations to be removed, where said modifying includes inserting a new synchronization operation where necessitated by removing synchronization operations in said set.

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