10.2 Preparing to Run Profiler

To profile an application running with Windows in 386 enhanced mode, you can use any system that is capable of running Windows in 386 enhanced mode.

In addition to ensuring that your system is compatible with Profiler, you must do the following:

1.Ensure that the Windows directory is defined in your PATH environment variable.

2.Include in your application at least the two mandatory Profiler functions ProfStart and ProfStop.

ProfStart indicates when you want Profiler to start sampling code; ProfStop indicates when you want Profiler to stop sampling. Other Profiler functions are optional.

3.Compile your application. Then link the compiled code with the standard Windows libraries, using the appropriate command-line option to prepare a symbol map (.MAP) file that includes PUBLIC symbols. The .MAP file is required by Microsoft Symbol File Generator (MAPSYM). For information about how to create the .MAP file during linking, see the documentation that accompanied your linker. For more information about MAPSYM, see Chapter 5, “Advanced Debugging: 80386 Debugger.”

4.Use MAPSYM to convert the .MAP file to a symbol (.SYM) file.