Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
perfcollect: don't restore symbols for local builds
  • Loading branch information
adamsitnik committed Jul 27, 2023
commit 95bc319574664c9d49f4765f15fc6bb8c66eb5e0
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
}
}
}