Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:38:50+00:00 2026-06-18T02:38:50+00:00

When I perform the PGO optimization step (using LINK.EXE /LTCG:PGU ), the Visual Studio

  • 0

When I perform the PGO optimization step (using LINK.EXE /LTCG:PGU), the Visual Studio 2010 linker complains:

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

What’s causing these “expectation failures”? How should I address them? It seems like PGO is still optimizing the code, but I’m a little suspicious of the quality/completeness of the optimizations in the presence of these messages.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:38:51+00:00Added an answer on June 18, 2026 at 2:38 am

    It seems that these errors occur when performing PGO-instrumented runs of multithreaded applications. They can be avoided by compiling (not linking) with the /PogoSafeMode flag on x64.

    I didn’t find the MSDN documentation on this flag particularly clear; the correct procedure for performing PGO on multithreaded code is:

    1. Compile with cl.exe /PogoSafeMode
    2. Link with link.exe /LTCG:PGI
    3. Execute your multithreaded profiling run(s)
    4. Re-link with link.exe /LTCG:PGO
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to perform a link of previously generated .obj files (using the latest
I perform an AJAX request to a PHP script in JavaScript and by using
I am trying to perform an automatic login when the user clicks a link
I perform some work using an NSBlockOperation and inside this block the persistent store
I am trying to perform a mapreduce job using the Python MRJob lib and
I am trying to perform different actions stored in the same controller using yii.
I need to perform a 128-bit RC4 encryption, I'm using .NET and C#. Is
I perform calculations using a double as follows: int minutes; double seconds; double DecMinutes;
I perform XSD XML validation using the following classes: import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import
I need to perform 'n' unions using mysqli (where n changes based on user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.