Share via


Select a Function to Profile

OverviewDetails

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

With the /SF option (PREP Phase I) you can profile a selected function and the functions it calls, so you can easily isolate a routine and its children for analysis.

To profile only MyFunc and the functions it calls, you might use the following line for Phase I PREP in a batch file or at the command line.

PREP /SF ?MyFunc@@YAXPAH@@ /FC %1

Or, if you are in the development environment, you might type the following in the Advanced settings text box of the Profile dialog box,

SF ?MyFunc@@YAXPAH@@

Using function selection can give you more useful results than function exclusion/inclusion, but function selection can be slower.

Note   When you specify a C++ function name to the profiler, you must provide its decorated name. The easiest way to get the decorated name is to look it up in the project’s .MAP file. For more information on C++ decorated names, see Decorated Names.