Using PROFILER.INI and TOOLS.INI

HomeOverviewDetails

Feature Only in Professional and Enterprise Editions   Profiling is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.

Upon invocation, the profiler looks in either one or two files for information about which object files and libraries to exclude. If neither of these files is present, profiling still continues. If exclude instructions exist in both files, all indicated object files and libraries will be excluded.

The PROFILER.INI file is created upon installation in \Program Files\Microsoft Visual Studio\VC98\bin . The [profiler] section of PROFILER.INI specifies libraries and object (.OBJ) files for the profiler to ignore. PROFILER.INI excludes object files and libraries from profiling that you would not ordinarily want to profile. By default, PROFILER.INI excludes the Win32 libraries, Microsoft Foundation Class (MFC) libraries, and C run-time libraries. View this file to see the complete list.

Whenever the profiler is run, it checks for the existence of the PROFILER.INI file in the same directory that the profiler executable files are located. If the file is present, it will exclude libraries and object files as indicated.

You should not modify PROFILER.INI, because if you reinstall Visual C++ the file will be overwritten.

TOOLS.INI is the file where you should specify additional object files and libraries to exclude from profiling. You have to create this file. You also have to set the INIT environment variable to the directory where TOOLS.INI can be found. For example, if you create TOOLS.INI in the root directory of your machine, you would set INIT to C:\.

As a sample, the following lines are taken from the default PROFILER.INI and represent the same format to use in TOOLS.INI. These commands exclude the common dialog and graphics device interface (GDI) libraries from profiling:

[profiler]
exclude:comdlg32.lib
exclude:gdi32.lib