r/cpp • • May 20 '26

Introducing Sample Profile Guided Optimization in MSVC

https://devblogs.microsoft.com/cppblog/introducing-sample-profile-guided-optimization-in-msvc
58 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/barfyus May 20 '26 edited May 20 '26

Yes, tried to add perf_spt.dll and perf_lbr.dll both at the end and at the beginning of the file.

Double checked using where xperf.exe that xperf.exe is indeed started from C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit folder.

edit: The error was due to missing perf_hv.dll. Now that it was added to perfcore.ini file, I can successfully run SPTAggregate.exe utility.

I think the linked documentation topic should mention that as well.

3

u/ericbrumer MSVC Dev Lead May 20 '26

Hi, MSVC dev lead here. We missed perf_hv.dll. We are updating the tutorial to reflect this (it should be updated in day or so).

We've also updated the blog to reference the tutorial, and have added a step to mention perfcore.ini more explicitly.

Thanks for the feedback!