首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >VS2010 PGO中的这些“期望失败”消息是什么?我如何修复它们?

VS2010 PGO中的这些“期望失败”消息是什么?我如何修复它们?
EN

Stack Overflow用户
提问于 2013-01-16 03:52:55
回答 1查看 129关注 0票数 0

当我执行PGO优化步骤(使用LINK.EXE /LTCG:PGU)时,Visual Studio2010链接器报告:

代码语言:javascript
复制
Merging foo!1.pgc
'FOO_EDGE::get_input': Arc 2 --> 4 has negative count (-414343)
Expectation failed: f line 4241
'FOO_DELAY::set_delay': Block 18 outgoing counts differ from block count (-9 diff)
Expectation failed: f line 4261
Expectation failed: f line 4211
'FOO_DELAY::set_delay': Arc 12 --> 23 has negative count (-3)
Expectation failed: f line 4220
Generating code
907 of 4948 ( 18.33%) profiled functions will be compiled for speed
4948 of 4948 functions (100.0%) were optimized using profile data
42912225037 of 42912225037 instructions (100.0%) were optimized using profile data

是什么导致了这些“期望失败”?我应该如何解决这些问题?似乎PGO仍在优化代码,但我对出现这些消息时优化的质量/完整性有点怀疑。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-30 07:13:55

这些错误似乎是在执行多线程应用程序的PGO检测运行时发生的。它们可以通过使用x64上的/PogoSafeMode标志进行编译(而不是链接)来避免。

我发现MSDN documentation on this flag并不是特别清楚;在多线程代码上执行PGO的正确过程是:

使用cl.exe /PogoSafeMode

  • Link使用link.exe /LTCG:PGI

  • Execute多线程性能分析run(s)

  • Re-link使用link.exe /LTCG:PGO

编译

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14345715

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档