From 95bc319574664c9d49f4765f15fc6bb8c66eb5e0 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 27 Jul 2023 10:58:05 +0200 Subject: [PATCH] perfcollect: don't restore symbols for local builds --- src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs b/src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs index c31896dcaf..6dd5bdd2e9 100644 --- a/src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs +++ b/src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs @@ -194,10 +194,14 @@ private void StopCollection(DiagnoserActionParameters parameters) private void EnsureSymbolsForNativeRuntime(DiagnoserActionParameters parameters) { + if (parameters.BenchmarkCase.GetToolchain() is CoreRunToolchain) + { + return; // it's not needed for a local build of dotnet runtime + } + string cliPath = parameters.BenchmarkCase.GetToolchain() switch { CsProjCoreToolchain core => core.CustomDotNetCliPath, - CoreRunToolchain coreRun => coreRun.CustomDotNetCliPath.FullName, NativeAotToolchain nativeAot => nativeAot.CustomDotNetCliPath, _ => DotNetCliCommandExecutor.DefaultDotNetCliPath.Value }; @@ -251,4 +255,4 @@ private FileInfo GetTraceFile(DiagnoserActionParameters parameters, string exten => new (ArtifactFileNameHelper.GetTraceFilePath(parameters, creationTime, extension) .Replace(" ", "_")); // perfcollect does not allow for spaces in the trace file name } -} \ No newline at end of file +}