Skip to content

Commit

Permalink
perfcollect: don't restore symbols for local builds (#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik committed Jul 31, 2023
1 parent 90ef2ae commit 914ee71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down Expand Up @@ -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
}
}
}

0 comments on commit 914ee71

Please sign in to comment.