之前使用vs2010 vs2015都可以使用CPU采样进行性能测试,后来就用不了了;
以下链接中有相关信息:
参考链接:
https://developercommunity.visualstudio.com/content/problem/177958/starting-the-profiler-leads-to-computer-restart-af.html
https://superuser.com/questions/1287914/visual-studio-2013-profiler-chrashes-and-system-restarts-reboots/1303132#1303132.
管理CVE-2018-3639(推测性商店绕过),CVE-2017-5715(Spectre变体2)和CVE-2017-5754(融化)的缓解措施
https://support.microsoft.com/en-us/help/4073119/protect-against-speculative-execution-side-channel-vulnerabilities-in.
Speculative Store Bypass (SSB)(推测存储绕过)
https://en.wikipedia.org/wiki/Speculative_Store_Bypass
原因:
微软发布的最新补丁(Meltdown / Spectre)引发;
Windows 8中Windows OS内核中对Visual Studio Profiler进行了重大修改,使用不同的技术来收集采样分析数据,Windows 8禁止使用Windows 7中的收集技术;
在更新安全补丁之后,win7 也禁止了该技术,不再允许由采样分析器执行的操作,使用的低级数据收集代码会导致计算机重新启动,发生这种情况时,不会蓝屏,也不会进行事件日志条目。(艾伦·丹佛)
添加以下注册表可解决:(禁用缓解措施)
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management” /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management” /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
ps:启用缓解措施见链接3