Introduction

CGProf is a profiling tool implemented with Etch, designed to give you precise and complete information about the bottlenecks and time-sinks in your application. CGProf can be used with Win32 applications and DLLs, including multi-threaded applications. As it is based on Etch, CGProf gives you the convenience of creating a profiled version of an application directly from the executable, without requiring source code and without complicating the build environment. Etch and CGProf require debugging information in order to be able to provide output using procedure names. When debugging information is not available, CGProf profiles in terms of address ranges. When source code and debugging information is available, a coordinated Emacs browsing mode provides point-and-click navigation of source from CGProf profiles.

CGProf provides a complete view of application performance. Rather than using statistical sampling, as is commonly used by many profilers, CGProf uses Etch instrumentation to monitor all procedure calls and returns during the application. CGProf uses either the hardware-based cycle counter or Etch-based instruction counts to record all activity in application modules. By monitoring calls into DLL routines, CGProf can also measure time spent in system modules. This helps to identify the DLLs where your application spends the most time, even for system modules such as kernel32.dll that can't be rewritten by Etch.

CGProf provides a hierarchical profile. Profile information is presented based on the application call graph. For each procedure in the application CGProf reports three times: time spent in the procedure itself, time spent in routines called by the procedure, and total time for the procedure. This makes it easier to relate execution time to the high-level activities of an application and understand where the time is going.

Features of CGProf