-
Notifications
You must be signed in to change notification settings - Fork 279
Make TraceCollector work on Linux #4706
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
base: main
Are you sure you want to change the base?
Conversation
@@ -11,7 +11,7 @@ public static (string, string) Build(MicrobenchmarkConfiguration configuration, | |||
string filter = benchmark ?? configuration.MicrobenchmarkConfigurations.Filter; | |||
|
|||
// Base command: Add mandatory commands. | |||
string command = $"run -f {frameworkVersion} --filter \"{filter}\" -c Release --noOverwrite --no-build"; | |||
string command = $"run -f {frameworkVersion} --filter \"{filter}\" -c Release --inProcess --noOverwrite --no-build"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that dotnet-trace only collect the first app(-- <command>) or specified process(--process-id <PID>), we start inProcess run for microbenchmarks
src/benchmarks/gc/GC.Infrastructure/GC.Infrastructure.Core/TraceCollection/TraceCollector.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
|
||
|
||
// If a trace is requested, ensure the file exists. If not, there is was an error and alert the user. | ||
if (configuration.TraceConfigurations?.Type != "none") | ||
{ | ||
// Not checking Linux here since the local run only allows for Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this comment since we are now checking Linux.
{ CollectType.threadtime, "collect_threadTime" } | ||
}; | ||
|
||
internal static readonly Dictionary<CollectType, string> LinuxLocalRunCollectTypeMap = new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably rename:
Line 38 in ab9190f
internal static readonly Dictionary<CollectType, string> LinuxCollectTypeMap = new() |
LinuxServerRunCollectTypeMap
.
|
||
internal static readonly Dictionary<CollectType, string> LinuxLocalRunCollectTypeMap = new() | ||
{ | ||
{ CollectType.gc, "--clrevents gc" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check: https://github.com/Maoni0/mem-doc/blob/master/doc/.NETMemoryPerformanceAnalysis.md#how-to-collect-top-level-gc-metrics - seems like the right params are: --profile gc-collect
.
{ | ||
{ CollectType.gc, "--clrevents gc" }, | ||
{ CollectType.cpu, "--clrevents gc+stack --clreventlevel informational" }, | ||
{ CollectType.threadtime, "--clrevents gc --clreventlevel Verbose" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration doesn't match with the threadtime based trace collection - let's get rid of this until we find a good enough alternative.
…erformance into EnableGCInfraOnLinux
Since PerfView only works on Windows, we use dotnet-trace as trace collector on Linux.