×

Identifying code that wastes time switching tasks

  • US 8,095,921 B2
  • Filed: 10/12/2005
  • Issued: 01/10/2012
  • Est. Priority Date: 10/12/2005
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method of detecting portions of code of a computer program that protect resources of a computer system unnecessarily, said method comprising:

  • identifying a synchronization object that has been engaged by a thread of the computer program;

    while the synchronization object is engaged, determining whether state memory has been allocated for a resource of the computer system that is protected by the synchronization object and, if state memory has not been allocated, allocating state memory for recording accesses to the resource;

    recording each access of the resource and a thread associated with the access;

    when the synchronization object is disengaged, determining a number of threads that have accessed the resource while protected by the synchronization object during execution of the computer program; and

    indicating whether the resource protected by the synchronization object is suited for protection according to the number of threads that accessed the resource while the synchronization object was engaged during execution of the computer program.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×