Share via


Merge Profiler Output from the Command Line

OverviewDetails

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

If you need a single PLIST report from multiple profile runs, you must write and execute a batch file like this:

PREP /LV myprog.exe myfuncs.dll
PROFILE /O myprog1 myprog.exe
PROFILE /O myprog2 myprog.exe
PROFILE /O myprog3 myprog.exe
PREP /IT myprog /IO myprog1 /IO myprog2 /IO myprog3 /OT myprog
PLIST myprog >myprog.out

In this example, the program data can vary for each invocation of the PROFILE command.  Then, the data is merged in the second PREP invocation.

Or, alternatively, because PREP Phase II adds data to an existing .PBT file:

PREP /LV myprog.exe myfuncs.dll
PROFILE myprog
PREP /M myprog
PROFILE myprog
PREP /M myprog
PROFILE myprog
PREP /M myprog
PLIST myprog >myprog.out

In this example, the output of the current profiler run is merged with the cumulative statistics from all previous profiler runs.

Note   You can merge only eight .PBO files from the command line with each PREP invocation. To overcome this limitation, use PREP Phase II to merge groups of .PBO files into .PBT files. Then, merge the resulting .PBT files to yield a single .PBT file that contains statistics from the constituent .PBO files.

You cannot merge .PBO or .PBT files from different .PBI files. PREP can combine information only from profiling sessions that use the same .EXE and .PBI files (and therefore have identical profiling characteristics). You cannot, for example, merge the results of a timing session with the results of a coverage session.