From 90f97ac50154ee23449f273c3a8d13dfe985815b Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Sat, 24 Apr 2021 18:18:20 -0700 Subject: [PATCH] Use newest PGO data for Linux and windows-x86 (#51656) 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. --- eng/Version.Details.xml | 2 +- eng/Versions.props | 2 +- src/coreclr/.nuget/optdata/optdata.csproj | 2 -- src/coreclr/pgosupport.cmake | 6 +++++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 26428d2..2bacc8f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -86,7 +86,7 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization f69d7fc09c4fdb9e9427741b9a176e867dab577f - + https://dev.azure.com/dnceng/internal/_git/dotnet-optimization f69d7fc09c4fdb9e9427741b9a176e867dab577f diff --git a/eng/Versions.props b/eng/Versions.props index a6086ee..08a5e19 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -129,7 +129,7 @@ 99.99.99-master-20200806.6 99.99.99-master-20200806.6 99.99.99-master-20200806.6 - 99.99.99-master-20210415.12 + 99.99.99-master-20210420.2 16.9.0-beta1.21055.5 2.0.0-beta1.20253.1 diff --git a/src/coreclr/.nuget/optdata/optdata.csproj b/src/coreclr/.nuget/optdata/optdata.csproj index 3bb1e6d..716f99f 100644 --- a/src/coreclr/.nuget/optdata/optdata.csproj +++ b/src/coreclr/.nuget/optdata/optdata.csproj @@ -8,8 +8,6 @@ True - 99.99.99-master-20200806.6 - $(oldOptimizationPGOCoreCLRVersion) win7-x64;win7-x86;linux-x64 true <_TargetOSArchLowercase>$(TargetOS.ToLower())-$(TargetArchitecture.ToLower()) diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 1e2be5d..c0791c4 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -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 @@ -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}\"") -- 2.7.4