Skip to content

Commit

Permalink
Use newest PGO data for Linux and windows-x86 (#51656)
Browse files Browse the repository at this point in the history
This data was previously held back because we weren't producing
builds with Linux or windows-x86 but now we are. The Linux builds
now produce only a single profdata file, coreclr.profdata, which 
should contain all the profile information for all the libraries in the
runtime.
  • Loading branch information
agocke authored Apr 25, 2021
1 parent a123d28 commit 90f97ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>f69d7fc09c4fdb9e9427741b9a176e867dab577f</Sha>
</Dependency>
<Dependency Name="optimization.PGO.CoreCLR" Version="99.99.99-master-20200806.6">
<Dependency Name="optimization.PGO.CoreCLR" Version="99.99.99-master-20210420.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>f69d7fc09c4fdb9e9427741b9a176e867dab577f</Sha>
</Dependency>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<optimizationlinuxx64IBCCoreFxVersion>99.99.99-master-20200806.6</optimizationlinuxx64IBCCoreFxVersion>
<optimizationwindows_ntx64IBCCoreCLRVersion>99.99.99-master-20200806.6</optimizationwindows_ntx64IBCCoreCLRVersion>
<optimizationlinuxx64IBCCoreCLRVersion>99.99.99-master-20200806.6</optimizationlinuxx64IBCCoreCLRVersion>
<optimizationPGOCoreCLRVersion>99.99.99-master-20210415.12</optimizationPGOCoreCLRVersion>
<optimizationPGOCoreCLRVersion>99.99.99-master-20210420.2</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftDiaSymReaderNativeVersion>16.9.0-beta1.21055.5</MicrosoftDiaSymReaderNativeVersion>
<SystemCommandLineVersion>2.0.0-beta1.20253.1</SystemCommandLineVersion>
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/.nuget/optdata/optdata.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<OptimizationDataSupported Condition="'$(TargetOS)' == 'Linux' And '$(TargetArchitecture)' == 'x64'">True</OptimizationDataSupported>

<!-- At the moment, we are only generating data for Windows X64 in the most recent optimization data publishing platform. Use the old data for now -->
<oldOptimizationPGOCoreCLRVersion>99.99.99-master-20200806.6</oldOptimizationPGOCoreCLRVersion>
<optimizationPGOCoreCLRVersion Condition="'$(TargetOS)' != 'windows' or '$(TargetArchitecture)' != 'x64'">$(oldOptimizationPGOCoreCLRVersion)</optimizationPGOCoreCLRVersion>
<RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers>
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
<_TargetOSArchLowercase>$(TargetOS.ToLower())-$(TargetArchitecture.ToLower())</_TargetOSArchLowercase>
Expand Down
6 changes: 5 additions & 1 deletion src/coreclr/pgosupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function(add_pgo TargetName)
if(CLR_CMAKE_HOST_WIN32)
set(ProfileFileName "${TargetName}.pgd")
else(CLR_CMAKE_HOST_WIN32)
set(ProfileFileName "${TargetName}.profdata")
set(ProfileFileName "coreclr.profdata")
endif(CLR_CMAKE_HOST_WIN32)

file(TO_NATIVE_PATH
Expand All @@ -41,6 +41,10 @@ function(add_pgo TargetName)
# If we don't have profile data availble, gracefully fall back to a non-PGO opt build
if(NOT EXISTS ${ProfilePath})
message("PGO data file NOT found: ${ProfilePath}")
elseif(CMAKE_GENERATOR MATCHES "Visual Studio")
# MSVC is sensitive to exactly the options passed during PGO optimization and Ninja and
# MSBuild differ slightly (but not meaningfully for runtime behavior)
message("Cannot use PGO optimization built with Ninja from MSBuild. Re-run build with Ninja to apply PGO information")
else(NOT EXISTS ${ProfilePath})
if(CLR_CMAKE_HOST_WIN32)
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"")
Expand Down

0 comments on commit 90f97ac

Please sign in to comment.