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.