Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perfcollect: don't restore symbols for local builds #2384

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
}
}
}