Edit

/SPDIN (Use Sample Profile Database)

Specifies a Sample Profile Database (SPD) file that contains profiling data for use in a Sample Profile-Guided Optimization (SPGO) build. Also used to override the default or file specified with /SPD for reading the sample profile database.

Syntax

/SPDIN:filename

Argument

filename
Specifies the path to the .spd file that contains the profiling data to use for optimization. When expanded, the fully qualified path must not exceed MAX_PATH (260 characters).
If the file doesn't exist, the linker creates an empty file that will be used to collect data.

Remarks

After collecting a performance trace by using xperf, converting it by using SPTAggregate, and importing the data into an SPD file by using SPDConvert, use /SPDIN and /SPGO to produce an optimized binary.

The GUID and age of the binary recorded in the SPD file must match the SPT file. If they don't match, you may see a "SPD version incompatible" error. To diagnose this error, use SPTDump /progid to inspect the binary identifiers in the SPT file, and SPDDump /header to inspect the SPD file. The linker uses a valid SPD file to the extent possible. Minor updates to the code that don't alter the program's control flow are tolerated. Unchanged functions also use the data for optimization. If you provide a valid, but otherwise unrelated SPD, the process works, but likely no data is usable for optimization.

Use /SPDEMBED together with /SPGO to embed the SPD data into the PDB file produced by the build.

Use /SPD to specify a nondefault name or location for the SPD file. /SPDIN overrides this option, if specified.

For more information about the SPGO workflow, see Tutorial: Use Sample Profile-Guided Optimization (SPGO) to improve performance.

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
  2. Select the Configuration Properties > Linker > Command Line property page.
  3. Add /SPDIN:filename to the Additional Options box. Choose OK to save your changes.

To set this linker option programmatically

See also

MSVC linker reference
MSVC Linker Options
/SPD (Specify Sample Profile Database)
/SPDEMBED (Embed Sample Profile Database)
/SPGO (Enable Sample Profile-Guided Optimization)
Tutorial: Use Sample Profile-Guided Optimization (SPGO) to improve performance