Tools and techniques for instrumenting interfaces of units of a software program
First Claim
1. A computer-readable medium storing computer-executable instructions for causing a computer system programmed thereby to perform a method comprising:
- detecting a reference to an interface, wherein a software program comprises plural units, and wherein one of the plural units exposes the interface;
determining if the interface has been wrapped by checking a data structure that tracks interface wrapping for the plural units of the software program by determining if there is an existing entry for the interface in the data structure;
if the interface has been wrapped, returning a reference to the existing entry for the interface from the data structure, wherein the existing entry is a reference to an existing interface wrapper related to the interface which associates the interface with a unit identity for the unit that exposes the interface, wherein the existing interface wrapper stores a reference to instrumentation, the reference to the interface, and the unit identity of the unit that exposes the interface;
if the interface has not been wrapped,discovering the unit identity of the unit that exposes the interface;
adding a new entry to the data structure, wherein the new entry is a reference to a new interface wrapper related to the interface which associates the interface with the discovered unit identity; and
returning a reference to the new entry.
2 Assignments
0 Petitions
Accused Products
Abstract
An automatic distributed partitioning system (ADPS) determines which unit exposes an interface. The ADPS detects a reference to an interface. For the interface, the ADPS assures that the unit that exposes the interface is identified. In some embodiments, a data structure such as a hash table associates interfaces with identified units. An interface wrapper for the interface stores the identity of the unit that exposes the interface, as well as information about the interface and a reference to instrumentation. When a client unit calls a member function of an interface, the interface wrapper intercepts the call and invokes the instrumentation. The instrumentation performs an operation such as profiling the application or classifying a unit. The ADPS detects when an interface is undocumented, and handles undocumented interfaces without invoking the full instrumentation capabilities of the ADPS.
118 Citations
23 Claims
-
1. A computer-readable medium storing computer-executable instructions for causing a computer system programmed thereby to perform a method comprising:
-
detecting a reference to an interface, wherein a software program comprises plural units, and wherein one of the plural units exposes the interface; determining if the interface has been wrapped by checking a data structure that tracks interface wrapping for the plural units of the software program by determining if there is an existing entry for the interface in the data structure; if the interface has been wrapped, returning a reference to the existing entry for the interface from the data structure, wherein the existing entry is a reference to an existing interface wrapper related to the interface which associates the interface with a unit identity for the unit that exposes the interface, wherein the existing interface wrapper stores a reference to instrumentation, the reference to the interface, and the unit identity of the unit that exposes the interface; if the interface has not been wrapped, discovering the unit identity of the unit that exposes the interface; adding a new entry to the data structure, wherein the new entry is a reference to a new interface wrapper related to the interface which associates the interface with the discovered unit identity; and returning a reference to the new entry. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 21)
-
-
14. A computer-readable medium storing computer-executable instructions for causing a computer system programmed thereby to perform a method comprising:
-
detecting a reference to an interface, wherein one of plural components of software exposes the interface; determining if the interface is wrapped using a hash table, wherein if the interface is wrapped, a reference to an existing interface wrapper related to the interface is stored in the hash table, and wherein the existing interface wrapper stores a reference to instrumentation, the reference to the interface, and component identity of the component that exposes the interface; if the interface is wrapped, providing to a client component the reference to the existing interface wrapper; if the interface is not wrapped, creating a new interface wrapper for the interface, wherein the new interface wrapper stores the reference to the instrumentation and the reference to the interface; creating a new entry in the hash table, wherein the new entry relates the interface with the created new interface wrapper; discovering the component identity of the component that exposes the interface; storing in the new interface wrapper the component identity of the component that exposes the interface; and providing to the client component a reference to the new interface wrapper; and receiving from the client component an invocation of the instrumentation through the provided reference to the existing or new interface wrapper. - View Dependent Claims (15, 16, 17, 18, 19, 22, 23)
-
Specification