7 Profilers

A profiler is an interface to profiling information in a component. An instance of a profiler is requested from the component whose profile data is required. The profiler can then be queried for profile information. Integral to the design of profilers is the concept of domains. A profiler domain is a specific type of profiling data. A profiler may provide zero, one, or more domains. Examples of domains from a CPU component are numbers of calls to specific instructions, number of accesses to specific ports, and number of accesses to specific memory addresses. However, it should be noted that no component, including CPUs, are required to provide any profiling information or any specific domains. The methods of the TProfiler class are:


void Clear( integer Domain )


Clears all profiling information for the specified domain. If Domain is -1, all domains are cleared. The call is ignored if Domain is out of the range of valid domains.



string Domain_Name( integer Index )


Returns the domain name for the specified index. If the index is not a valid domain, the method returns NULL. The first domain is index 0.



string Report_Line( integer Domain, integer Index )


Returns a line of textual information associated with the specified domain. Index is the line of information to retrieve. The first line is index 0. If an invalid domain or index is passed, the method returns NULL.



integer Version()


Returns the version of the CEF specification that the object adheres to. This is the major.minor version times 10. For instance, a value of 20 indicates version 2.0.