Share via


Profile Multithreaded Applications

OverviewDetails

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

For multithreaded applications, profiler behavior depends on the profiling method.

For line counting and line coverage, the profiler does not discriminate among threads. The hit counts encompass all the program’s threads.

For function timing, function counting, and function coverage, profiling is thread-dependent. You can profile an individual thread by (1) declaring the thread’s main function as the starting function (PREP /SF option), and (2) including all functions in the program (don’t use the PREP /EXC option).

The profile results will be difficult to interpret if you do not specify a starting function, if you specify a starting function that is called from multiple threads, or if you don’t include all functions.